! function(n, t) {
    t(["./kendo.combobox.min", "./kendo.dropdownlist.min", "./kendo.resizable.min", "./kendo.window.min", "./kendo.colorpicker.min", "./kendo.imagebrowser.min", "./kendo.core.min", "./kendo.filebrowser.min"], n)
}(function() {
    return function() {
            ! function(n) {
                var t = n.Observable.extend({
                    init: function(t) {
                        n.Observable.fn.init.call(this, t);
                        this.clear()
                    },
                    events: ["undo", "redo"],
                    push: function(n) {
                        this.stack = this.stack.slice(0, this.currentCommandIndex + 1);
                        this.currentCommandIndex = this.stack.push(n) - 1
                    },
                    undo: function() {
                        if (this.canUndo()) {
                            var n = this.stack[this.currentCommandIndex--];
                            n.undo();
                            this.trigger("undo", {
                                command: n
                            })
                        }
                    },
                    redo: function() {
                        if (this.canRedo()) {
                            var n = this.stack[++this.currentCommandIndex];
                            n.redo();
                            this.trigger("redo", {
                                command: n
                            })
                        }
                    },
                    clear: function() {
                        this.stack = [];
                        this.currentCommandIndex = -1
                    },
                    canUndo: function() {
                        return this.currentCommandIndex >= 0
                    },
                    canRedo: function() {
                        return this.currentCommandIndex != this.stack.length - 1
                    }
                });
                n.deepExtend(n, {
                    util: {
                        UndoRedoStack: t
                    }
                })
            }(kendo)
        }(),
        function() {
            ! function(n, t) {
                var o, p, w, l, i = window.kendo,
                    b = i.Class,
                    y = i.ui.Widget,
                    a = i.support.mobileOS,
                    e = i.support.browser,
                    c = n.extend,
                    f = n.proxy,
                    d = i.deepExtend,
                    r = ".kendoEditor",
                    s = i.keys,
                    k = b.extend({
                        init: function(n) {
                            this.options = n
                        },
                        getHtml: function() {
                            var n = this.options;
                            return i.template(n.template, {
                                useWithBlock: !1
                            })(n)
                        }
                    }),
                    v = {
                        editorWrapperTemplate: '<table cellspacing="4" cellpadding="0" class="k-widget k-editor k-header" role="presentation"><tbody><tr role="presentation"><td class="k-editor-toolbar-wrap" role="presentation"><ul class="k-editor-toolbar" role="toolbar" /><\/td><\/tr><tr><td class="k-editable-area" /><\/tr><\/tbody><\/table>',
                        buttonTemplate: '<a href="" role="button" class="k-tool"#= data.popup ? " data-popup" : "" # unselectable="on" title="#= data.title #"><span unselectable="on" class="k-tool-icon #= data.cssClass #"><\/span><span class="k-tool-text">#= data.title #<\/span><\/a>',
                        colorPickerTemplate: '<div class="k-colorpicker #= data.cssClass #" />',
                        comboBoxTemplate: '<select title="#= data.title #" class="#= data.cssClass #" />',
                        dropDownListTemplate: '<span class="k-editor-dropdown"><select title="#= data.title #" class="#= data.cssClass #" /><\/span>',
                        separatorTemplate: '<span class="k-separator" />',
                        overflowAnchorTemplate: '<a href="" role="button" class="k-tool k-overflow-anchor" data-popup unselectable="on"><span unselectable="on" class="k-icon k-i-more"><\/span><\/a>',
                        formatByName: function(t, i) {
                            for (var r = 0; i.length > r; r++)
                                if (n.inArray(t, i[r].tags) >= 0) return i[r]
                        },
                        registerTool: function(n, t) {
                            var i = t.options;
                            i && i.template && (i.template.options.cssClass = "k-" + n);
                            t.name || (t.options.name = n, t.name = n.toLowerCase());
                            u.defaultTools[n] = t
                        },
                        registerFormat: function(n, t) {
                            u.fn.options.formats[n] = t
                        }
                    },
                    g = !a || a.ios && a.flatVersion >= 500 || !a.ios && t !== document.documentElement.contentEditable,
                    h = {
                        basic: ["bold", "italic", "underline"],
                        alignment: ["justifyLeft", "justifyCenter", "justifyRight"],
                        lists: ["insertUnorderedList", "insertOrderedList"],
                        indenting: ["indent", "outdent"],
                        links: ["createLink", "unlink"],
                        tables: ["createTable", "addColumnLeft", "addColumnRight", "addRowAbove", "addRowBelow", "deleteRow", "deleteColumn"]
                    },
                    u = y.extend({
                        init: function(t, u) {
                            var s, l, a, v, o, e = this,
                                h = i.ui.editor,
                                p = h.Dom;
                            g && (y.fn.init.call(e, t, u), e.options = d({}, e.options, u), e.options.tools = e.options.tools.slice(), t = e.element, o = t[0], v = p.name(o), t.closest("form").on("submit" + r, function() {
                                e.update()
                            }), a = c({}, e.options), a.editor = e, "textarea" == v ? (e._wrapTextarea(), l = e.wrapper.find(".k-editor-toolbar"), o.id && l.attr("aria-controls", o.id)) : (e.element.attr("contenteditable", !0).addClass("k-widget k-editor k-editor-inline"), a.popup = !0, l = n('<ul class="k-editor-toolbar" role="toolbar" />').insertBefore(t)), e.toolbar = new h.Toolbar(l[0], a), e.toolbar.bindTo(e), "textarea" == v && setTimeout(function() {
                                var t = e.wrapper[0].style.height,
                                    n = parseInt(t, 10),
                                    i = e.wrapper.height();
                                t.indexOf("px") > 0 && !isNaN(n) && i > n && e.wrapper.height(n - (i - n))
                            }), e._resizable(), e._initializeContentElement(e), e.keyboard = new h.Keyboard([new h.BackspaceHandler(e), new h.TypingHandler(e), new h.SystemHandler(e)]), e.clipboard = new h.Clipboard(this), e.undoRedoStack = new i.util.UndoRedoStack, u && u.value ? s = u.value : e.textarea ? (s = o.value, e.options.encoded && n.trim(o.defaultValue).length && (s = o.defaultValue), s = s.replace(/[\r\n\v\f\t ]+/gi, " ")) : s = o.innerHTML, e.value(s), n(document).on("mousedown", f(e._endTyping, e)).on("mouseup", f(e._mouseup, e)), e.toolbar.resize(), i.notify(e))
                        },
                        _endTyping: function() {
                            var n = this.keyboard;
                            try {
                                n.isTypingInProgress() && (n.endTyping(!0), this.saveSelection())
                            } catch (t) {}
                        },
                        _selectionChange: function() {
                            e.msie || i.ui.editor.Dom.ensureTrailingBreaks(this.body);
                            this._selectionStarted = !1;
                            this.saveSelection();
                            this.trigger("select", {})
                        },
                        _resizable: function() {
                            var i = this.options.resizable,
                                r = n.isPlainObject(i) ? i.content === t || i.content === !0 : i;
                            r && this.textarea && (n("<div class='k-resize-handle'><span class='k-icon k-resize-se' /><\/div>").insertAfter(this.textarea), this.wrapper.kendoResizable(c({}, this.options.resizable, {
                                start: function(t) {
                                    var i = this.editor = n(t.currentTarget).closest(".k-editor");
                                    this.initialSize = i.height();
                                    i.find("td:last").append("<div class='k-overlay' />")
                                },
                                resize: function(n) {
                                    var i = n.y.initialDelta,
                                        t = this.initialSize + i,
                                        r = this.options.min || 0,
                                        u = this.options.max || 1 / 0;
                                    t = Math.min(u, Math.max(r, t));
                                    this.editor.height(t)
                                },
                                resizeend: function() {
                                    this.editor.find(".k-overlay").remove();
                                    this.editor = null
                                }
                            })))
                        },
                        _wrapTextarea: function() {
                            var i = this,
                                t = i.element,
                                u = t[0].style.width,
                                f = t[0].style.height,
                                e = v.editorWrapperTemplate,
                                r = n(e).insertBefore(t).width(u).height(f),
                                o = r.find(".k-editable-area");
                            t.attr("autocomplete", "off").appendTo(o).addClass("k-content k-raw-content").css("display", "none");
                            i.textarea = t;
                            i.wrapper = r
                        },
                        _createContentElement: function(t) {
                            var r, e, u, f = this,
                                o = f.textarea,
                                h = f.options.domain,
                                c = h || document.domain,
                                s = "",
                                l = 'javascript:""';
                            return (h || c != location.hostname) && (s = '<script>document.domain="' + c + '"<\/script>', l = "javascript:document.write('" + s + "')"), o.hide(), r = n("<iframe />", {
                                title: f.options.messages.editAreaTitle,
                                frameBorder: "0"
                            })[0], n(r).css("display", "").addClass("k-content").insertBefore(o), r.src = l, e = r.contentWindow || r, u = e.document || r.contentDocument, n(r).one("load", function() {
                                f.toolbar.decorateFrom(u.body)
                            }), u.open(), u.write("<!DOCTYPE html><html><head><meta charset='utf-8' /><style>html,body{padding:0;margin:0;height:100%;min-height:100%;}body{font-size:12px;font-family:Verdana,Geneva,sans-serif;margin-top:-1px;padding:1px .2em 0;word-wrap: break-word;-webkit-nbsp-mode: space;-webkit-line-break: after-white-space;" + (i.support.isRtl(o) ? "direction:rtl;" : "") + "}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em}h3{font-size:1.16em}h4{font-size:1em}h5{font-size:.83em}h6{font-size:.7em}p{margin:0 0 1em;}.k-marker{display:none;}.k-paste-container,.Apple-style-span{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}ul,ol{padding-left:2.5em}span{-ms-high-contrast-adjust:none;}a{color:#00a}code{font-size:1.23em}telerik\\3Ascript{display: none;}.k-table{table-layout:fixed;width:100%;border-spacing:0;margin: 0 0 1em;}.k-table td{min-width:1px;padding:.2em .3em;}.k-table,.k-table td{outline:0;border: 1px dotted #ccc;}.k-table p{margin:0;padding:0;}k\\:script{display:none;}<\/style>" + s + "<script>(function(d,c){d[c]('header'),d[c]('article'),d[c]('nav'),d[c]('section'),d[c]('footer');})(document, 'createElement');<\/script>" + n.map(t, function(n) {
                                return "<link rel='stylesheet' href='" + n + "'>"
                            }).join("") + "<\/head><body autocorrect='off' contenteditable='true'><\/body><\/html>"), u.close(), e
                        },
                        _blur: function() {
                            var n = this.textarea,
                                t = n ? n.val() : this._oldValue,
                                i = this.options.encoded ? this.encodedValue() : this.value();
                            this.update();
                            n && n.trigger("blur");
                            i != t && this.trigger("change")
                        },
                        _spellCorrect: function(u) {
                            var f, e = !1;
                            n(u.body).on("contextmenu" + r, function() {
                                u.one("select", function() {
                                    f = null
                                });
                                u._spellCorrectTimeout = setTimeout(function() {
                                    f = new i.ui.editor.RestorePoint(u.getRange());
                                    e = !1
                                }, 10)
                            }).on("input" + r, function() {
                                return f ? i.support.browser.mozilla && !e ? (e = !0, t) : (i.ui.editor._finishUpdate(u, f), t) : t
                            })
                        },
                        _initializeContentElement: function() {
                            var o, h, u = this;
                            u.textarea ? (u.window = u._createContentElement(u.options.stylesheets), o = u.document = u.window.contentDocument || u.window.document, u.body = o.body, h = u.window, n(o).on("mouseup" + r, f(u._mouseup, u))) : (u.window = window, o = u.document = document, u.body = u.element[0], h = u.body, u.toolbar.decorateFrom(u.body));
                            n(h).on("blur" + r, f(this._blur, this));
                            try {
                                o.execCommand("enableInlineTableEditing", null, !1)
                            } catch (c) {}
                            i.support.touch && n(o).on("selectionchange" + r, f(this._selectionChange, this)).on("keydown" + r, function() {
                                i._activeElement() != o.body && u.window.focus()
                            });
                            this._spellCorrect(u);
                            n(u.body).on("dragstart" + r, !1).on("keydown" + r, function(n) {
                                var i, r, o, e, h, c;
                                return n.keyCode !== s.BACKSPACE && n.keyCode !== s.DELETE || "true" === u.body.getAttribute("contenteditable") ? n.keyCode === s.F10 ? (setTimeout(f(u.toolbar.focus, u.toolbar), 100), n.preventDefault(), t) : ((n.keyCode == s.LEFT || n.keyCode == s.RIGHT) && (i = u.getRange(), r = n.keyCode == s.LEFT, o = i[r ? "startContainer" : "endContainer"], e = i[r ? "startOffset" : "endOffset"], h = r ? -1 : 1, r && (e -= 1), e + h > 0 && 3 == o.nodeType && "﻿" == o.nodeValue[e] && (i.setStart(o, e + h), i.collapse(!0), u.selectRange(i))), (c = u.keyboard.toolFromShortcut(u.toolbar.tools, n)) ? (n.preventDefault(), /^(undo|redo)$/.test(c) || u.keyboard.endTyping(!0), u.trigger("keydown", n), u.exec(c), !1) : (u.keyboard.clearTimeout(), u.keyboard.keydown(n), t)) : !1
                            }).on("keyup" + r, function(t) {
                                (n.inArray(t.keyCode, [8, 9, 33, 34, 35, 36, 37, 38, 39, 40, 40, 45, 46]) > -1 || 65 == t.keyCode && t.ctrlKey && !t.altKey && !t.shiftKey) && u._selectionChange();
                                u.keyboard.keyup(t)
                            }).on("mousedown" + r, function(t) {
                                if (u._selectionStarted = !0, !e.gecko) {
                                    var i = n(t.target);
                                    (2 == t.which || 1 == t.which && t.ctrlKey) && i.is("a[href]") && window.open(i.attr("href"), "_new")
                                }
                            }).on("click" + r, function(n) {
                                var t, r = i.ui.editor.Dom;
                                "img" === r.name(n.target) && (t = u.createRange(), t.selectNode(n.target), u.selectRange(t))
                            }).on("cut" + r + " paste" + r, function(n) {
                                u.clipboard["on" + n.type](n)
                            }).on("focusin" + r, function() {
                                n(this).addClass("k-state-active");
                                u.toolbar.show()
                            }).on("focusout" + r, function() {
                                setTimeout(function() {
                                    var t = i._activeElement(),
                                        r = u.body,
                                        f = u.toolbar;
                                    t == r || n.contains(r, t) || n(t).is(".k-editortoolbar-dragHandle") || f.focused() || (n(r).removeClass("k-state-active"), f.hide())
                                }, 10)
                            })
                        },
                        _mouseup: function() {
                            var n = this;
                            n._selectionStarted && setTimeout(function() {
                                n._selectionChange()
                            }, 1)
                        },
                        refresh: function() {
                            var n = this;
                            n.textarea && (n.textarea.val(n.value()), n.wrapper.find("iframe").remove(), n._initializeContentElement(n), n.value(n.textarea.val()))
                        },
                        events: ["select", "change", "execute", "error", "paste", "keydown", "keyup"],
                        options: {
                            name: "Editor",
                            messages: {
                                bold: "Bold",
                                italic: "Italic",
                                underline: "Underline",
                                strikethrough: "Strikethrough",
                                superscript: "Superscript",
                                subscript: "Subscript",
                                justifyCenter: "Center text",
                                justifyLeft: "Align text left",
                                justifyRight: "Align text right",
                                justifyFull: "Justify",
                                insertUnorderedList: "Insert unordered list",
                                insertOrderedList: "Insert ordered list",
                                indent: "Indent",
                                outdent: "Outdent",
                                createLink: "Insert hyperlink",
                                unlink: "Remove hyperlink",
                                insertImage: "Insert image",
                                insertFile: "Insert file",
                                insertHtml: "Insert HTML",
                                viewHtml: "View HTML",
                                fontName: "Select font family",
                                fontNameInherit: "(inherited font)",
                                fontSize: "Select font size",
                                fontSizeInherit: "(inherited size)",
                                formatBlock: "Format",
                                formatting: "Format",
                                foreColor: "Color",
                                backColor: "Background color",
                                style: "Styles",
                                emptyFolder: "Empty Folder",
                                editAreaTitle: "Editable area. Press F10 for toolbar.",
                                uploadFile: "Upload",
                                orderBy: "Arrange by:",
                                orderBySize: "Size",
                                orderByName: "Name",
                                invalidFileType: 'The selected file "{0}" is not valid. Supported file types are {1}.',
                                deleteFile: 'Are you sure you want to delete "{0}"?',
                                overwriteFile: 'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',
                                directoryNotFound: "A directory with this name was not found.",
                                imageWebAddress: "Web address",
                                imageAltText: "Alternate text",
                                imageWidth: "Width (px)",
                                imageHeight: "Height (px)",
                                fileWebAddress: "Web address",
                                fileTitle: "Title",
                                linkWebAddress: "Web address",
                                linkText: "Text",
                                linkToolTip: "ToolTip",
                                linkOpenInNewWindow: "Open link in new window",
                                dialogUpdate: "Update",
                                dialogInsert: "Insert",
                                dialogCancel: "Cancel",
                                createTable: "Create table",
                                createTableHint: "Create a {0} x {1} table",
                                addColumnLeft: "Add column on the left",
                                addColumnRight: "Add column on the right",
                                addRowAbove: "Add row above",
                                addRowBelow: "Add row below",
                                deleteRow: "Delete row",
                                deleteColumn: "Delete column"
                            },
                            formats: {},
                            encoded: !0,
                            domain: null,
                            resizable: !1,
                            serialization: {
                                entities: !0,
                                semantic: !0,
                                scripts: !1
                            },
                            stylesheets: [],
                            dialogOptions: {
                                modal: !0,
                                resizable: !1,
                                draggable: !0,
                                animation: !1
                            },
                            imageBrowser: null,
                            fileBrowser: null,
                            fontName: [{
                                text: "Arial",
                                value: "Arial,Helvetica,sans-serif"
                            }, {
                                text: "Courier New",
                                value: "'Courier New',Courier,monospace"
                            }, {
                                text: "Georgia",
                                value: "Georgia,serif"
                            }, {
                                text: "Impact",
                                value: "Impact,Charcoal,sans-serif"
                            }, {
                                text: "Lucida Console",
                                value: "'Lucida Console',Monaco,monospace"
                            }, {
                                text: "Tahoma",
                                value: "Tahoma,Geneva,sans-serif"
                            }, {
                                text: "Times New Roman",
                                value: "'Times New Roman',Times,serif"
                            }, {
                                text: "Trebuchet MS",
                                value: "'Trebuchet MS',Helvetica,sans-serif"
                            }, {
                                text: "Verdana",
                                value: "Verdana,Geneva,sans-serif"
                            }],
                            fontSize: [{
                                text: "1 (8pt)",
                                value: "xx-small"
                            }, {
                                text: "2 (10pt)",
                                value: "x-small"
                            }, {
                                text: "3 (12pt)",
                                value: "small"
                            }, {
                                text: "4 (14pt)",
                                value: "medium"
                            }, {
                                text: "5 (18pt)",
                                value: "large"
                            }, {
                                text: "6 (24pt)",
                                value: "x-large"
                            }, {
                                text: "7 (36pt)",
                                value: "xx-large"
                            }],
                            formatBlock: [{
                                text: "Paragraph",
                                value: "p"
                            }, {
                                text: "Quotation",
                                value: "blockquote"
                            }, {
                                text: "Heading 1",
                                value: "h1"
                            }, {
                                text: "Heading 2",
                                value: "h2"
                            }, {
                                text: "Heading 3",
                                value: "h3"
                            }, {
                                text: "Heading 4",
                                value: "h4"
                            }, {
                                text: "Heading 5",
                                value: "h5"
                            }, {
                                text: "Heading 6",
                                value: "h6"
                            }],
                            tools: [].concat.call(["formatting"], h.basic, h.alignment, h.lists, h.indenting, h.links, ["insertImage"], h.tables)
                        },
                        destroy: function() {
                            var t = this;
                            y.fn.destroy.call(t);
                            n(t.window).add(t.document).add(t.body).add(t.wrapper).add(t.element.closest("form")).off(r);
                            n(document).off("mousedown", f(t._endTyping, t)).off("mouseup", f(t._mouseup, t));
                            clearTimeout(this._spellCorrectTimeout);
                            t._focusOutside();
                            t.toolbar.destroy();
                            i.destroy(t.wrapper)
                        },
                        _focusOutside: function() {
                            if (i.support.browser.msie && this.textarea) {
                                var t = n("<input style='position:absolute;left:-10px;top:-10px;width:1px;height:1px;font-size:0;border:0;' />").appendTo(document.body).focus();
                                t.blur().remove()
                            }
                        },
                        state: function(n) {
                            var r, t, e = u.defaultTools[n],
                                f = e && (e.options.finder || e.finder),
                                o = i.ui.editor.RangeUtils;
                            return f ? (r = this.getRange(), t = o.textNodes(r), !t.length && r.collapsed && (t = [r.startContainer]), f.getFormat ? f.getFormat(t) : f.isFormatted(t)) : !1
                        },
                        value: function(n) {
                            var r = this.body,
                                u = i.ui.editor,
                                f = u.Serializer.domToXhtml(r, this.options.serialization);
                            return n === t ? f : (n != f && (u.Serializer.htmlToDom(n, r), e.msie || i.ui.editor.Dom.ensureTrailingBreaks(this.body), this.selectionRestorePoint = null, this.update(), this.toolbar.refreshTools()), t)
                        },
                        saveSelection: function(t) {
                            t = t || this.getRange();
                            var r = t.commonAncestorContainer,
                                u = this.body;
                            (r == u || n.contains(u, r)) && (this.selectionRestorePoint = new i.ui.editor.RestorePoint(t))
                        },
                        _focusBody: function() {
                            var n, t = this.body,
                                f = this.wrapper && this.wrapper.find("iframe")[0],
                                r = this.document.documentElement,
                                u = i._activeElement();
                            u != t && u != f && (n = r.scrollTop, t.focus(), r.scrollTop = n)
                        },
                        restoreSelection: function() {
                            this._focusBody();
                            this.selectionRestorePoint && this.selectRange(this.selectionRestorePoint.toRange())
                        },
                        focus: function() {
                            this.restoreSelection()
                        },
                        update: function(n) {
                            n = n || this.options.encoded ? this.encodedValue() : this.value();
                            this.textarea ? this.textarea.val(n) : this._oldValue = n
                        },
                        encodedValue: function() {
                            return i.ui.editor.Dom.encode(this.value())
                        },
                        createRange: function(n) {
                            return i.ui.editor.RangeUtils.createRange(n || this.document)
                        },
                        getSelection: function() {
                            return i.ui.editor.SelectionUtils.selectionFromDocument(this.document)
                        },
                        selectRange: function(n) {
                            this._focusBody();
                            var t = this.getSelection();
                            t.removeAllRanges();
                            t.addRange(n);
                            this.saveSelection(n)
                        },
                        getRange: function() {
                            var t = this.getSelection(),
                                n = t && t.rangeCount > 0 ? t.getRangeAt(0) : this.createRange(),
                                i = this.document;
                            return n.startContainer != i || n.endContainer != i || n.startOffset || n.endOffset || (n.setStart(this.body, 0), n.collapse(!0)), n
                        },
                        selectedHtml: function() {
                            return i.ui.editor.Serializer.domToXhtml(this.getRange().cloneContents())
                        },
                        paste: function(t, r) {
                            var u = new i.ui.editor.InsertHtmlCommand(n.extend({
                                range: this.getRange(),
                                html: t
                            }, r));
                            u.editor = this;
                            u.exec()
                        },
                        exec: function(n, i) {
                            var h, o, l, s, r = this,
                                e = null;
                            if (!n) throw Error("kendoEditor.exec(): `name` parameter cannot be empty");
                            if ("true" !== r.body.getAttribute("contenteditable")) return !1;
                            if (n = n.toLowerCase(), r.keyboard.isTypingInProgress() || r.restoreSelection(), o = r.toolbar.toolById(n), !o)
                                for (s in u.defaultTools)
                                    if (s.toLowerCase() == n) {
                                        o = u.defaultTools[s];
                                        break
                                    }
                            if (o) {
                                if (h = r.getRange(), o.command && (e = o.command(c({
                                        range: h
                                    }, i))), l = r.trigger("execute", {
                                        name: n,
                                        command: e
                                    })) return;
                                if (/^(undo|redo)$/i.test(n)) r.undoRedoStack[n]();
                                else if (e && (e.managesUndoRedo || r.undoRedoStack.push(e), e.editor = r, e.exec(), e.async)) return e.change = f(r._selectionChange, r), t;
                                r._selectionChange()
                            }
                        }
                    });
                u.defaultTools = {
                    undo: {
                        options: {
                            key: "Z",
                            ctrl: !0
                        }
                    },
                    redo: {
                        options: {
                            key: "Y",
                            ctrl: !0
                        }
                    }
                };
                i.ui.plugin(u);
                o = b.extend({
                    init: function(n) {
                        this.options = n
                    },
                    initialize: function(n, t) {
                        n.attr({
                            unselectable: "on",
                            title: t.title
                        });
                        n.children(".k-tool-text").html(t.title)
                    },
                    command: function(n) {
                        return new this.options.command(n)
                    },
                    update: n.noop
                });
                o.exec = function(n, t, i) {
                    n.exec(t, {
                        value: i
                    })
                };
                p = o.extend({
                    init: function(n) {
                        o.fn.init.call(this, n)
                    },
                    command: function(n) {
                        var t = this;
                        return new i.ui.editor.FormatCommand(c(n, {
                            formatter: t.options.formatter
                        }))
                    },
                    update: function(n, t) {
                        var i = this.options.finder.isFormatted(t);
                        n.toggleClass("k-state-selected", i);
                        n.attr("aria-pressed", i)
                    }
                });
                v.registerTool("separator", new o({
                    template: new k({
                        template: v.separatorTemplate
                    })
                }));
                w = e.msie && 9 > e.version ? "﻿" : "";
                l = '<br class="k-br" />';
                e.msie && (10 > e.version ? l = "﻿" : 11 > e.version && (l = " "));
                c(i.ui, {
                    editor: {
                        ToolTemplate: k,
                        EditorUtils: v,
                        Tool: o,
                        FormatTool: p,
                        _bomFill: w,
                        emptyElementContent: l
                    }
                });
                i.PDFMixin && (i.PDFMixin.extend(u.prototype), u.prototype._drawPDF = function() {
                    return i.drawing.drawDOM(this.body, this.options.pdf)
                }, u.prototype.saveAsPDF = function() {
                    var t, u, r = new n.Deferred,
                        f = r.promise(),
                        e = {
                            promise: f
                        };
                    if (!this.trigger("pdfExport", e)) return t = this.options.pdf, u = t.paperSize, this._drawPDF(r).then(function(n) {
                        return t.paperSize = "auto", i.drawing.exportPDF(n, t)
                    }).done(function(n) {
                        i.saveAs({
                            dataURI: n,
                            fileName: t.fileName,
                            proxyURL: t.proxyURL,
                            forceProxy: t.forceProxy
                        });
                        t.paperSize = u;
                        r.resolve()
                    }).fail(function(n) {
                        r.reject(n)
                    }), f
                })
            }(window.jQuery)
        }(),
        function() {
            ! function(n) {
                function r(n) {
                    for (var r = {}, t = 0, i = n.length; i > t; t++) r[n[t]] = !0;
                    return r
                }
                var h, c, l, a, v, y, p, w, b, t, i = window.kendo,
                    u = n.map,
                    k = n.extend,
                    f = i.support.browser,
                    e = "style",
                    d = "float",
                    g = "cssFloat",
                    nt = "styleFloat",
                    tt = "class",
                    it = "k-marker",
                    o = r("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed".split(",")),
                    rt = "div,p,h1,h2,h3,h4,h5,h6,address,applet,blockquote,button,center,dd,dir,dl,dt,fieldset,form,frameset,hr,iframe,isindex,map,menu,noframes,noscript,object,pre,script,table,tbody,td,tfoot,th,thead,tr,header,article,nav,footer,section,aside,main,figure,figcaption".split(","),
                    s = rt.concat(["ul", "ol", "li"]),
                    ut = r(s),
                    ft = "span,em,a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,strike,strong,sub,sup,textarea,tt,u,var,data,time,mark,ruby".split(","),
                    et = r(ft),
                    st = r("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected".split(",")),
                    ot = function(n) {
                        1 == n.nodeType && n.normalize()
                    };
                f.msie && f.version >= 8 && (ot = function(n) {
                    if (1 == n.nodeType && n.firstChild)
                        for (var r = n.firstChild, i = r;;) {
                            if (i = i.nextSibling, !i) break;
                            3 == i.nodeType && 3 == r.nodeType && (i.nodeValue = r.nodeValue + i.nodeValue, t.remove(r));
                            r = i
                        }
                });
                h = /^\s+$/;
                c = /rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i;
                l = /\ufeff/g;
                a = /^(\s+|\ufeff)$/;
                y = "color,padding-left,padding-right,padding-top,padding-bottom,background-color,background-attachment,background-image,background-position,background-repeat,border-top-style,border-top-width,border-top-color,border-bottom-style,border-bottom-width,border-bottom-color,border-left-style,border-left-width,border-left-color,border-right-style,border-right-width,border-right-color,font-family,font-size,font-style,font-variant,font-weight,line-height".split(",");
                p = /[<>\&]/g;
                w = /[\u00A0-\u2666<>\&]/g;
                b = {
                    34: "quot",
                    38: "amp",
                    39: "apos",
                    60: "lt",
                    62: "gt",
                    160: "nbsp",
                    161: "iexcl",
                    162: "cent",
                    163: "pound",
                    164: "curren",
                    165: "yen",
                    166: "brvbar",
                    167: "sect",
                    168: "uml",
                    169: "copy",
                    170: "ordf",
                    171: "laquo",
                    172: "not",
                    173: "shy",
                    174: "reg",
                    175: "macr",
                    176: "deg",
                    177: "plusmn",
                    178: "sup2",
                    179: "sup3",
                    180: "acute",
                    181: "micro",
                    182: "para",
                    183: "middot",
                    184: "cedil",
                    185: "sup1",
                    186: "ordm",
                    187: "raquo",
                    188: "frac14",
                    189: "frac12",
                    190: "frac34",
                    191: "iquest",
                    192: "Agrave",
                    193: "Aacute",
                    194: "Acirc",
                    195: "Atilde",
                    196: "Auml",
                    197: "Aring",
                    198: "AElig",
                    199: "Ccedil",
                    200: "Egrave",
                    201: "Eacute",
                    202: "Ecirc",
                    203: "Euml",
                    204: "Igrave",
                    205: "Iacute",
                    206: "Icirc",
                    207: "Iuml",
                    208: "ETH",
                    209: "Ntilde",
                    210: "Ograve",
                    211: "Oacute",
                    212: "Ocirc",
                    213: "Otilde",
                    214: "Ouml",
                    215: "times",
                    216: "Oslash",
                    217: "Ugrave",
                    218: "Uacute",
                    219: "Ucirc",
                    220: "Uuml",
                    221: "Yacute",
                    222: "THORN",
                    223: "szlig",
                    224: "agrave",
                    225: "aacute",
                    226: "acirc",
                    227: "atilde",
                    228: "auml",
                    229: "aring",
                    230: "aelig",
                    231: "ccedil",
                    232: "egrave",
                    233: "eacute",
                    234: "ecirc",
                    235: "euml",
                    236: "igrave",
                    237: "iacute",
                    238: "icirc",
                    239: "iuml",
                    240: "eth",
                    241: "ntilde",
                    242: "ograve",
                    243: "oacute",
                    244: "ocirc",
                    245: "otilde",
                    246: "ouml",
                    247: "divide",
                    248: "oslash",
                    249: "ugrave",
                    250: "uacute",
                    251: "ucirc",
                    252: "uuml",
                    253: "yacute",
                    254: "thorn",
                    255: "yuml",
                    402: "fnof",
                    913: "Alpha",
                    914: "Beta",
                    915: "Gamma",
                    916: "Delta",
                    917: "Epsilon",
                    918: "Zeta",
                    919: "Eta",
                    920: "Theta",
                    921: "Iota",
                    922: "Kappa",
                    923: "Lambda",
                    924: "Mu",
                    925: "Nu",
                    926: "Xi",
                    927: "Omicron",
                    928: "Pi",
                    929: "Rho",
                    931: "Sigma",
                    932: "Tau",
                    933: "Upsilon",
                    934: "Phi",
                    935: "Chi",
                    936: "Psi",
                    937: "Omega",
                    945: "alpha",
                    946: "beta",
                    947: "gamma",
                    948: "delta",
                    949: "epsilon",
                    950: "zeta",
                    951: "eta",
                    952: "theta",
                    953: "iota",
                    954: "kappa",
                    955: "lambda",
                    956: "mu",
                    957: "nu",
                    958: "xi",
                    959: "omicron",
                    960: "pi",
                    961: "rho",
                    962: "sigmaf",
                    963: "sigma",
                    964: "tau",
                    965: "upsilon",
                    966: "phi",
                    967: "chi",
                    968: "psi",
                    969: "omega",
                    977: "thetasym",
                    978: "upsih",
                    982: "piv",
                    8226: "bull",
                    8230: "hellip",
                    8242: "prime",
                    8243: "Prime",
                    8254: "oline",
                    8260: "frasl",
                    8472: "weierp",
                    8465: "image",
                    8476: "real",
                    8482: "trade",
                    8501: "alefsym",
                    8592: "larr",
                    8593: "uarr",
                    8594: "rarr",
                    8595: "darr",
                    8596: "harr",
                    8629: "crarr",
                    8656: "lArr",
                    8657: "uArr",
                    8658: "rArr",
                    8659: "dArr",
                    8660: "hArr",
                    8704: "forall",
                    8706: "part",
                    8707: "exist",
                    8709: "empty",
                    8711: "nabla",
                    8712: "isin",
                    8713: "notin",
                    8715: "ni",
                    8719: "prod",
                    8721: "sum",
                    8722: "minus",
                    8727: "lowast",
                    8730: "radic",
                    8733: "prop",
                    8734: "infin",
                    8736: "ang",
                    8743: "and",
                    8744: "or",
                    8745: "cap",
                    8746: "cup",
                    8747: "int",
                    8756: "there4",
                    8764: "sim",
                    8773: "cong",
                    8776: "asymp",
                    8800: "ne",
                    8801: "equiv",
                    8804: "le",
                    8805: "ge",
                    8834: "sub",
                    8835: "sup",
                    8836: "nsub",
                    8838: "sube",
                    8839: "supe",
                    8853: "oplus",
                    8855: "otimes",
                    8869: "perp",
                    8901: "sdot",
                    8968: "lceil",
                    8969: "rceil",
                    8970: "lfloor",
                    8971: "rfloor",
                    9001: "lang",
                    9002: "rang",
                    9674: "loz",
                    9824: "spades",
                    9827: "clubs",
                    9829: "hearts",
                    9830: "diams",
                    338: "OElig",
                    339: "oelig",
                    352: "Scaron",
                    353: "scaron",
                    376: "Yuml",
                    710: "circ",
                    732: "tilde",
                    8194: "ensp",
                    8195: "emsp",
                    8201: "thinsp",
                    8204: "zwnj",
                    8205: "zwj",
                    8206: "lrm",
                    8207: "rlm",
                    8211: "ndash",
                    8212: "mdash",
                    8216: "lsquo",
                    8217: "rsquo",
                    8218: "sbquo",
                    8220: "ldquo",
                    8221: "rdquo",
                    8222: "bdquo",
                    8224: "dagger",
                    8225: "Dagger",
                    8240: "permil",
                    8249: "lsaquo",
                    8250: "rsaquo",
                    8364: "euro"
                };
                t = {
                    block: ut,
                    inline: et,
                    findNodeIndex: function(n, t) {
                        var i = 0;
                        if (!n) return -1;
                        for (;;) {
                            if (n = n.previousSibling, !n) break;
                            t && 3 == n.nodeType || i++
                        }
                        return i
                    },
                    isDataNode: function(n) {
                        return n && null !== n.nodeValue && null !== n.data
                    },
                    isAncestorOf: function(i, r) {
                        try {
                            return !t.isDataNode(i) && (n.contains(i, t.isDataNode(r) ? r.parentNode : r) || r.parentNode == i)
                        } catch (u) {
                            return !1
                        }
                    },
                    isAncestorOrSelf: function(n, i) {
                        return t.isAncestorOf(n, i) || n == i
                    },
                    findClosestAncestor: function(n, i) {
                        if (t.isAncestorOf(n, i))
                            for (; i && i.parentNode != n;) i = i.parentNode;
                        return i
                    },
                    getNodeLength: function(n) {
                        return t.isDataNode(n) ? n.length : n.childNodes.length
                    },
                    splitDataNode: function(n, i) {
                        for (var f, u = n.cloneNode(!1), e = "", r = n.nextSibling; r && 3 == r.nodeType && r.nodeValue;) e += r.nodeValue, f = r, r = r.nextSibling, t.remove(f);
                        n.deleteData(i, n.length);
                        u.deleteData(0, i);
                        u.nodeValue += e;
                        t.insertAfter(u, n)
                    },
                    attrEquals: function(n, r) {
                        var u, f;
                        for (u in r)
                            if (f = n[u], u == d && (f = n[i.support.cssFloat ? g : nt]), "object" == typeof f) {
                                if (!t.attrEquals(f, r[u])) return !1
                            } else if (f != r[u]) return !1;
                        return !0
                    },
                    blockParentOrBody: function(n) {
                        return t.parentOfType(n, s) || n.ownerDocument.body
                    },
                    blockParents: function(i) {
                        for (var u, f = [], r = 0, e = i.length; e > r; r++) u = t.parentOfType(i[r], t.blockElements), u && n.inArray(u, f) < 0 && f.push(u);
                        return f
                    },
                    windowFromDocument: function(n) {
                        return n.defaultView || n.parentWindow
                    },
                    normalize: ot,
                    blockElements: s,
                    nonListBlockElements: rt,
                    inlineElements: ft,
                    empty: o,
                    fillAttrs: st,
                    toHex: function(n) {
                        var t = c.exec(n);
                        return t ? "#" + u(t.slice(1), function(n) {
                            return n = parseInt(n, 10).toString(16), n.length > 1 ? n : "0" + n
                        }).join("") : n
                    },
                    encode: function(n, t) {
                        var i = !t || t.entities ? w : p;
                        return n.replace(i, function(n) {
                            var i = n.charCodeAt(0),
                                t = b[i];
                            return t ? "&" + t + ";" : n
                        })
                    },
                    stripBom: function(n) {
                        return (n || "").replace(l, "")
                    },
                    insignificant: function(n) {
                        var i = n.attributes;
                        return "k-marker" == n.className || t.is(n, "br") && ("k-br" == n.className || i._moz_dirty || i._moz_editor_bogus_node)
                    },
                    significantNodes: function(i) {
                        return n.grep(i, function(n) {
                            var i = t.name(n);
                            return "br" == i ? !1 : t.insignificant(n) ? !1 : 3 == n.nodeType && a.test(n.nodeValue) ? !1 : 1 == n.nodeType && !o[i] && t.emptyNode(n) ? !1 : !0
                        })
                    },
                    emptyNode: function(n) {
                        return 1 == n.nodeType && !t.significantNodes(n.childNodes).length
                    },
                    name: function(n) {
                        return n.nodeName.toLowerCase()
                    },
                    significantChildNodes: function(i) {
                        return n.grep(i.childNodes, function(n) {
                            return 3 != n.nodeType || !t.isWhitespace(n)
                        })
                    },
                    lastTextNode: function(n) {
                        var i, r = null;
                        if (3 == n.nodeType) return n;
                        for (i = n.lastChild; i; i = i.previousSibling)
                            if (r = t.lastTextNode(i)) return r;
                        return r
                    },
                    is: function(n, i) {
                        return t.name(n) == i
                    },
                    isMarker: function(n) {
                        return n.className == it
                    },
                    isWhitespace: function(n) {
                        return h.test(n.nodeValue)
                    },
                    isBlock: function(n) {
                        return ut[t.name(n)]
                    },
                    isEmpty: function(n) {
                        return o[t.name(n)]
                    },
                    isInline: function(n) {
                        return et[t.name(n)]
                    },
                    scrollContainer: function(n) {
                        var r = t.windowFromDocument(n),
                            u = (r.contentWindow || r).document || r.ownerDocument || r;
                        return i.support.browser.webkit || "BackCompat" == u.compatMode ? u.body : u.documentElement
                    },
                    scrollTo: function(i) {
                        var f, r, u = n(t.isDataNode(i) ? i.parentNode : i),
                            s = t.windowFromDocument(i.ownerDocument),
                            e = s.innerHeight,
                            o = t.scrollContainer(i.ownerDocument);
                        f = u.offset().top;
                        r = u[0].offsetHeight;
                        r || (r = parseInt(u.css("line-height"), 10) || Math.ceil(1.2 * parseInt(u.css("font-size"), 10)) || 15);
                        r + f > o.scrollTop + e && (o.scrollTop = r + f - e)
                    },
                    persistScrollTop: function(n) {
                        v = t.scrollContainer(n).scrollTop
                    },
                    restoreScrollTop: function(n) {
                        t.scrollContainer(n).scrollTop = v
                    },
                    insertAt: function(n, t, i) {
                        n.insertBefore(t, n.childNodes[i] || null)
                    },
                    insertBefore: function(n, t) {
                        return t.parentNode ? t.parentNode.insertBefore(n, t) : t
                    },
                    insertAfter: function(n, t) {
                        return t.parentNode.insertBefore(n, t.nextSibling)
                    },
                    remove: function(n) {
                        n.parentNode.removeChild(n)
                    },
                    removeTextSiblings: function(n) {
                        for (var t = n.parentNode; n.nextSibling && 3 == n.nextSibling.nodeType;) t.removeChild(n.nextSibling);
                        for (; n.previousSibling && 3 == n.previousSibling.nodeType;) t.removeChild(n.previousSibling)
                    },
                    trim: function(n) {
                        for (var i, r = n.childNodes.length - 1; r >= 0; r--) i = n.childNodes[r], t.isDataNode(i) ? (t.stripBom(i.nodeValue).length || t.remove(i), t.isWhitespace(i) && t.insertBefore(i, n)) : i.className != it && (t.trim(i), i.childNodes.length || t.isEmpty(i) || t.remove(i));
                        return n
                    },
                    closest: function(n, i) {
                        for (; n && t.name(n) != i;) n = n.parentNode;
                        return n
                    },
                    sibling: function(n, t) {
                        do n = n[t]; while (n && 1 != n.nodeType);
                        return n
                    },
                    next: function(n) {
                        return t.sibling(n, "nextSibling")
                    },
                    prev: function(n) {
                        return t.sibling(n, "previousSibling")
                    },
                    parentOfType: function(n, i) {
                        do n = n.parentNode; while (n && !t.ofType(n, i));
                        return n
                    },
                    ofType: function(i, r) {
                        return n.inArray(t.name(i), r) >= 0
                    },
                    changeTag: function(n, i, r) {
                        var f, c, o, h, s, u = t.create(n.ownerDocument, i),
                            l = n.attributes;
                        if (!r)
                            for (f = 0, c = l.length; c > f; f++) s = l[f], s.specified && (o = s.nodeName, h = s.nodeValue, o == tt ? u.className = h : o == e ? u.style.cssText = n.style.cssText : u.setAttribute(o, h));
                        for (; n.firstChild;) u.appendChild(n.firstChild);
                        return t.insertBefore(u, n), t.remove(n), u
                    },
                    editableParent: function(n) {
                        for (; n && (3 == n.nodeType || "true" !== n.contentEditable);) n = n.parentNode;
                        return n
                    },
                    wrap: function(n, i) {
                        return t.insertBefore(i, n), i.appendChild(n), i
                    },
                    unwrap: function(n) {
                        for (var t = n.parentNode; n.firstChild;) t.insertBefore(n.firstChild, n);
                        t.removeChild(n)
                    },
                    create: function(n, i, r) {
                        return t.attr(n.createElement(i), r)
                    },
                    attr: function(n, i) {
                        i = k({}, i);
                        i && e in i && (t.style(n, i.style), delete i.style);
                        for (var r in i) null === i[r] ? (n.removeAttribute(r), delete i[r]) : "className" == r && (n[r] = i[r]);
                        return k(n, i)
                    },
                    style: function(t, i) {
                        n(t).css(i || {})
                    },
                    unstyle: function(n, t) {
                        for (var r in t) r == d && (r = i.support.cssFloat ? g : nt), n.style[r] = "";
                        "" === n.style.cssText && n.removeAttribute(e)
                    },
                    inlineStyle: function(i, r, e) {
                        var s, o = n(t.create(i.ownerDocument, r, e));
                        return i.appendChild(o[0]), s = u(y, function(n) {
                            return f.msie && "line-height" == n && "1px" == o.css(n) ? "line-height:1.5" : n + ":" + o.css(n)
                        }).join(";"), o.remove(), s
                    },
                    getEffectiveBackground: function(n) {
                        var i = n.css("background-color");
                        return i.indexOf("rgba(0, 0, 0, 0") < 0 && "transparent" !== i ? i : "html" === n[0].tagName.toLowerCase() ? "Window" : t.getEffectiveBackground(n.parent())
                    },
                    removeClass: function(t, i) {
                        for (var r = " " + t.className + " ", e = i.split(" "), u = 0, f = e.length; f > u; u++) r = r.replace(" " + e[u] + " ", " ");
                        r = n.trim(r);
                        r.length ? t.className = r : t.removeAttribute(tt)
                    },
                    commonAncestor: function() {
                        var n, r, t, e, u, i = arguments.length,
                            f = [],
                            o = 1 / 0,
                            s = null;
                        if (!i) return null;
                        if (1 == i) return arguments[0];
                        for (n = 0; i > n; n++) {
                            for (r = [], t = arguments[n]; t;) r.push(t), t = t.parentNode;
                            f.push(r.reverse());
                            o = Math.min(o, r.length)
                        }
                        if (1 == i) return f[0][0];
                        for (n = 0; o > n; n++) {
                            for (e = f[0][n], u = 1; i > u; u++)
                                if (e != f[u][n]) return s;
                            s = e
                        }
                        return s
                    },
                    closestSplittableParent: function(i) {
                        var r, e, f;
                        return r = 1 == i.length ? t.parentOfType(i[0], ["ul", "ol"]) : t.commonAncestor.apply(null, i), r || (r = t.parentOfType(i[0], ["p", "td"]) || i[0].ownerDocument.body), t.isInline(r) && (r = t.blockParentOrBody(r)), e = u(i, t.editableParent), f = t.commonAncestor(e)[0], n.contains(r, f) && (r = f), r
                    },
                    closestEditable: function(i, r) {
                        var u, f = t.editableParent(i);
                        return u = t.ofType(i, r) ? i : t.parentOfType(i, r), u && f && n.contains(u, f) ? u = f : !u && f && (u = f), u
                    },
                    closestEditableOfType: function(n, i) {
                        var r = t.closestEditable(n, i);
                        if (r && t.ofType(r, i)) return r
                    },
                    filter: function(n, i, r) {
                        for (var f, u = 0, o = i.length, e = []; o > u; u++) f = t.name(i[u]), (!r && f == n || r && f != n) && e.push(i[u]);
                        return e
                    },
                    ensureTrailingBreaks: function(i) {
                        var u = n(i).find("p,td,th"),
                            f = u.length,
                            r = 0;
                        if (f)
                            for (; f > r; r++) t.ensureTrailingBreak(u[r]);
                        else t.ensureTrailingBreak(i)
                    },
                    removeTrailingBreak: function(t) {
                        n(t).find("br[type=_moz],.k-br").remove()
                    },
                    ensureTrailingBreak: function(n) {
                        var r, i, u;
                        t.removeTrailingBreak(n);
                        r = n.lastChild;
                        i = r && t.name(r);
                        (!i || "br" != i && "img" != i || "br" == i && "k-br" != r.className) && (u = n.ownerDocument.createElement("br"), u.className = "k-br", n.appendChild(u))
                    }
                };
                i.ui.editor.Dom = t
            }(window.kendo.jQuery)
        }(),
        function() {
            ! function(n, t) {
                var e, r, u = window.kendo,
                    o = u.ui.editor,
                    i = o.Dom,
                    a = n.extend,
                    s = "xx-small,x-small,small,medium,large,x-large,xx-large".split(","),
                    h = /"/g,
                    v = /<br[^>]*>/i,
                    c = /^\d+(\.\d*)?(px)?$/i,
                    y = /<p><\/p>/i,
                    p = /([\w|\-]+)\s*:\s*([^;]+);?/i,
                    w = /^sizzle-\d+/i,
                    l = /^k-script-/i,
                    b = /\s*onerror\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/i,
                    f = document.createElement("div");
                f.innerHTML = " <hr>";
                e = 3 === f.firstChild.nodeType;
                f = null;
                r = {
                    toEditableHtml: function(n) {
                        var t = '<br class="k-br">';
                        return n = n || "", n.replace(/<!\[CDATA\[(.*)?\]\]>/g, "<!--[CDATA[$1]]-->").replace(/<script([^>]*)>(.*)?<\/script>/gi, "<k:script$1>$2<\/k:script>").replace(/<img([^>]*)>/gi, function(n) {
                            return n.replace(b, "")
                        }).replace(/(<\/?img[^>]*>)[\r\n\v\f\t ]+/gi, "$1").replace(/^<(table|blockquote)/i, t + "<$1").replace(/^[\s]*(&nbsp;|\u00a0)/i, "$1").replace(/<\/(table|blockquote)>$/i, "<\/$1>" + t)
                    },
                    _fillEmptyElements: function(t) {
                        n(t).find("p").each(function() {
                            var t, r = n(this);
                            if (/^\s*$/g.test(r.text()) && !r.find("img,input").length) {
                                for (t = this; t.firstChild && 3 != t.firstChild.nodeType;) t = t.firstChild;
                                1 != t.nodeType || i.empty[i.name(t)] || (t.innerHTML = u.ui.editor.emptyElementContent)
                            }
                        })
                    },
                    _removeSystemElements: function(t) {
                        n(".k-paste-container", t).remove()
                    },
                    _resetOrderedLists: function(n) {
                        for (var t, r, u = n.getElementsByTagName("ol"), i = 0; u.length > i; i++) t = u[i], r = t.getAttribute("start"), t.setAttribute("start", 1), r ? t.setAttribute("start", r) : t.removeAttribute(r)
                    },
                    _preventScriptExecution: function(t) {
                        n(t).find("*").each(function() {
                            for (var n, i, u = this.attributes, t = 0, r = u.length; r > t; t++) n = u[t], i = n.nodeName, n.specified && /^on/i.test(i) && (this.setAttribute("k-script-" + i, n.value), this.removeAttribute(i))
                        })
                    },
                    htmlToDom: function(t, f) {
                        var e, o, s = u.support.browser,
                            h = s.msie,
                            c = h && 9 > s.version;
                        return t = r.toEditableHtml(t), c && (t = "<br/>" + t, e = "originalsrc", o = "originalhref", t = t.replace(/href\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/, o + '="$1"'), t = t.replace(/src\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/, e + '="$1"')), f.innerHTML = t, c ? (i.remove(f.firstChild), n(f).find("k\\:script,script,link,img,a").each(function() {
                            var n = this;
                            n[o] && (n.setAttribute("href", n[o]), n.removeAttribute(o));
                            n[e] && (n.setAttribute("src", n[e]), n.removeAttribute(e))
                        })) : h && (i.normalize(f), r._resetOrderedLists(f)), r._preventScriptExecution(f), r._fillEmptyElements(f), r._removeSystemElements(f), n("table", f).addClass("k-table"), f
                    },
                    domToXhtml: function(r, f) {
                        function nt(t) {
                            return n.grep(t, function(n) {
                                return "style" != n.name
                            })
                        }

                        function tt(t) {
                            for (var e, u, r, o = n.trim, s = o(t).split(";"), l = [], f = 0, c = s.length; c > f; f++) s[f].length && (e = p.exec(s[f]), e && (u = o(e[1].toLowerCase()), r = o(e[2]), "font-size-adjust" != u && "font-stretch" != u && (u.indexOf("color") >= 0 ? r = i.toHex(r) : u.indexOf("font") >= 0 ? r = r.replace(h, "'") : /\burl\(/g.test(r) && (r = r.replace(h, "")), l.push({
                                property: u,
                                value: r
                            }))));
                            return l
                        }

                        function it(n) {
                            for (var i = tt(n), t = 0; i.length > t; t++) o.push(i[t].property), o.push(":"), o.push(i[t].value), o.push(";")
                        }

                        function b(n) {
                            for (var u, r, o, t, h = [], c = n.attributes, e = 0, s = c.length; s > e; e++) u = c[e], r = u.nodeName, o = u.value, t = u.specified, "value" == r && "value" in n && n.value ? t = !0 : "type" == r && "text" == o ? t = !0 : "class" != r || o ? w.test(r) ? t = !1 : "complete" == r ? t = !1 : "altHtml" == r ? t = !1 : "start" == r && i.is(n, "ul") ? t = !1 : "start" == r && i.is(n, "ol") && "1" == o ? t = !1 : r.indexOf("_moz") >= 0 ? t = !1 : l.test(r) && (t = !!f.scripts) : t = !1, t && h.push(u);
                            return h
                        }

                        function a(r, f) {
                            var s, w, y, e, h, a, v, p;
                            if (f = f || b(r), i.is(r, "img") && (a = r.style.width, v = r.style.height, p = n(r), a && c.test(a) && (p.attr("width", parseInt(a, 10)), i.unstyle(r, {
                                    width: t
                                })), v && c.test(v) && (p.attr("height", parseInt(v, 10)), i.unstyle(r, {
                                    height: t
                                }))), f.length)
                                for (f.sort(function(n, t) {
                                        return n.nodeName > t.nodeName ? 1 : t.nodeName > n.nodeName ? -1 : 0
                                    }), s = 0, w = f.length; w > s; s++) y = f[s], e = y.nodeName, h = y.value, ("class" != e || "k-table" != h) && (e = e.replace(l, ""), o.push(" "), o.push(e), o.push('="'), "style" == e ? it(h || r.style.cssText) : o.push("src" == e || "href" == e ? u.htmlEncode(r.getAttribute(e, 2)) : i.fillAttrs[e] ? e : h), o.push('"'))
                        }

                        function k(n, t, i) {
                            for (var r = n.firstChild; r; r = r.nextSibling) rt(r, t, i)
                        }

                        function d(n) {
                            return n.nodeValue.replace(/\ufeff/g, "")
                        }

                        function rt(n, r, u) {
                            var s, h, y, c, l, v = n.nodeType;
                            if (1 == v) {
                                if (s = i.name(n), !s || i.insignificant(n)) return;
                                if (i.isInline(n) && 1 == n.childNodes.length && 3 == n.firstChild.nodeType && !d(n.firstChild)) return;
                                if (!f.scripts && ("script" == s || "k:script" == s)) return;
                                if (h = g[s], h && (t === h.semantic || f.semantic ^ h.semantic)) return h.start(n), k(n, !1, h.skipEncoding), h.end(n), t;
                                o.push("<");
                                o.push(s);
                                a(n);
                                i.empty[s] ? o.push(" />") : (o.push(">"), k(n, r || i.is(n, "pre")), o.push("<\/"), o.push(s), o.push(">"))
                            } else 3 == v ? (c = d(n), !r && e && (y = n.parentNode, l = n.previousSibling, l || (l = (i.isInline(y) ? y : n).previousSibling), (!l || "" === l.innerHTML || i.isBlock(l)) && (c = c.replace(/^[\r\n\v\f\t ]+/, "")), c = c.replace(/ +/, " ")), o.push(u ? c : i.encode(c, f))) : 4 == v ? (o.push("<![CDATA["), o.push(n.data), o.push("]\]>")) : 8 == v && (n.data.indexOf("[CDATA[") < 0 ? (o.push("<!--"), o.push(n.data), o.push("-->")) : (o.push("<!"), o.push(n.data), o.push(">")))
                        }

                        function ut(n) {
                            var t = n.childNodes.length,
                                r = t && 3 == n.firstChild.nodeType;
                            return r && (1 == t || 2 == t && i.insignificant(n.lastChild))
                        }
                        var o = [],
                            g = {
                                iframe: {
                                    start: function(n) {
                                        o.push("<iframe");
                                        a(n);
                                        o.push(">")
                                    },
                                    end: function() {
                                        o.push("<\/iframe>")
                                    }
                                },
                                "k:script": {
                                    start: function(n) {
                                        o.push("<script");
                                        a(n);
                                        o.push(">")
                                    },
                                    end: function() {
                                        o.push("<\/script>")
                                    },
                                    skipEncoding: !0
                                },
                                span: {
                                    semantic: !0,
                                    start: function(t) {
                                        var u, f, r = t.style,
                                            h = b(t),
                                            e = nt(h);
                                        e.length && (o.push("<span"), a(t, e), o.push(">"));
                                        "underline" == r.textDecoration && o.push("<u>");
                                        u = [];
                                        r.color && u.push('color="' + i.toHex(r.color) + '"');
                                        r.fontFamily && u.push('face="' + r.fontFamily + '"');
                                        r.fontSize && (f = n.inArray(r.fontSize, s), u.push('size="' + f + '"'));
                                        u.length && o.push("<font " + u.join(" ") + ">")
                                    },
                                    end: function(n) {
                                        var t = n.style;
                                        (t.color || t.fontFamily || t.fontSize) && o.push("<\/font>");
                                        "underline" == t.textDecoration && o.push("<\/u>");
                                        nt(b(n)).length && o.push("<\/span>")
                                    }
                                },
                                strong: {
                                    semantic: !0,
                                    start: function() {
                                        o.push("<b>")
                                    },
                                    end: function() {
                                        o.push("<\/b>")
                                    }
                                },
                                em: {
                                    semantic: !0,
                                    start: function() {
                                        o.push("<i>")
                                    },
                                    end: function() {
                                        o.push("<\/i>")
                                    }
                                },
                                b: {
                                    semantic: !1,
                                    start: function() {
                                        o.push("<strong>")
                                    },
                                    end: function() {
                                        o.push("<\/strong>")
                                    }
                                },
                                i: {
                                    semantic: !1,
                                    start: function() {
                                        o.push("<em>")
                                    },
                                    end: function() {
                                        o.push("<\/em>")
                                    }
                                },
                                u: {
                                    semantic: !1,
                                    start: function() {
                                        o.push('<span style="text-decoration:underline;">')
                                    },
                                    end: function() {
                                        o.push("<\/span>")
                                    }
                                },
                                font: {
                                    semantic: !1,
                                    start: function(n) {
                                        var t, r, u;
                                        o.push('<span style="');
                                        t = n.getAttribute("color");
                                        r = s[n.getAttribute("size")];
                                        u = n.getAttribute("face");
                                        t && (o.push("color:"), o.push(i.toHex(t)), o.push(";"));
                                        u && (o.push("font-family:"), o.push(u), o.push(";"));
                                        r && (o.push("font-size:"), o.push(r), o.push(";"));
                                        o.push('">')
                                    },
                                    end: function() {
                                        o.push("<\/span>")
                                    }
                                }
                            };
                        return g.script = g["k:script"], f = f || {}, t === f.semantic && (f.semantic = !0), ut(r) ? i.encode(d(r.firstChild).replace(/[\r\n\v\f\t ]+/, " "), f) : (k(r), o = o.join(""), "" === o.replace(v, "").replace(y, "") ? "" : o)
                    }
                };
                a(o, {
                    Serializer: r
                })
            }(window.kendo.jQuery)
        }(),
        function() {
            ! function(n) {
                function tt(n, i, r, f) {
                    var e, h, o, s;
                    if (n == i) return f - r;
                    for (e = i; e && e.parentNode != n;) e = e.parentNode;
                    if (e) return u(e) - r;
                    for (e = n; e && e.parentNode != i;) e = e.parentNode;
                    if (e) return f - u(e) - 1;
                    for (h = t.commonAncestor(n, i), o = n; o && o.parentNode != h;) o = o.parentNode;
                    for (o || (o = h), s = i; s && s.parentNode != h;) s = s.parentNode;
                    return s || (s = h), o == s ? 0 : u(s) - u(o)
                }

                function p(n, t) {
                    function i(n) {
                        try {
                            return tt(n.startContainer, n.endContainer, n.startOffset, n.endOffset) < 0
                        } catch (t) {
                            return !0
                        }
                    }
                    i(n) && (t ? (n.commonAncestorContainer = n.endContainer = n.startContainer, n.endOffset = n.startOffset) : (n.commonAncestorContainer = n.startContainer = n.endContainer, n.startOffset = n.endOffset), n.collapsed = !0)
                }

                function w(n) {
                    n.collapsed = n.startContainer == n.endContainer && n.startOffset == n.endOffset;
                    for (var i = n.startContainer; i && i != n.endContainer && !t.isAncestorOf(i, n.endContainer);) i = i.parentNode;
                    n.commonAncestorContainer = i
                }

                function it(n) {
                    var i = n.duplicate(),
                        r = n.duplicate();
                    return i.collapse(!0), r.collapse(!1), t.commonAncestor(n.parentElement(), i.parentElement(), r.parentElement())
                }

                function b(n, r, u) {
                    var s, f = r[u ? "startContainer" : "endContainer"],
                        c = r[u ? "startOffset" : "endOffset"],
                        l = 0,
                        a = i(f),
                        v = a ? f : f.childNodes[c] || null,
                        o = a ? f.parentNode : f,
                        h = r.ownerDocument,
                        e = h.body.createTextRange();
                    (3 == f.nodeType || 4 == f.nodeType) && (l = c);
                    o || (o = h.body);
                    "img" == o.nodeName.toLowerCase() ? (e.moveToElementText(o), e.collapse(!1), n.setEndPoint(u ? "StartToStart" : "EndToStart", e)) : (s = o.insertBefore(t.create(h, "a"), v), e.moveToElementText(s), t.remove(s), e[u ? "moveStart" : "moveEnd"]("character", l), e.collapse(!1), n.setEndPoint(u ? "StartToStart" : "EndToStart", e))
                }

                function k(n, r, f, e) {
                    var p, s, a, l, v, c, y, o = t.create(r.ownerDocument, "a"),
                        h = n.duplicate(),
                        b = e ? "StartToStart" : "StartToEnd",
                        w = !1;
                    o.innerHTML = "﻿";
                    h.collapse(e);
                    s = h.parentElement();
                    t.isAncestorOrSelf(f, s) || (s = f);
                    do w ? s.insertBefore(o, o.previousSibling) : (s.appendChild(o), w = !0), h.moveToElementText(o); while ((p = h.compareEndPoints(b, n)) > 0 && o.previousSibling);
                    a = o.nextSibling; - 1 == p && i(a) ? (h.setEndPoint(e ? "EndToStart" : "EndToEnd", n), t.remove(o), c = [a, h.text.length]) : (l = !e && o.previousSibling, v = e && o.nextSibling, i(v) ? c = [v, 0] : i(l) ? c = [l, l.length] : (y = u(o), c = s.nextSibling && y == s.childNodes.length - 1 ? [s.nextSibling, 0] : [s, y]), t.remove(o));
                    r[e ? "setStart" : "setEnd"].apply(r, c)
                }
                var s = window.kendo,
                    e = s.Class,
                    rt = n.extend,
                    d = s.ui.editor,
                    v = s.support.browser,
                    t = d.Dom,
                    u = t.findNodeIndex,
                    i = t.isDataNode,
                    h = t.findClosestAncestor,
                    y = t.getNodeLength,
                    o = t.normalize,
                    c = {
                        selectionFromWindow: function(n) {
                            return "getSelection" in n ? n.getSelection() : new g(n.document)
                        },
                        selectionFromRange: function(n) {
                            var t = r.documentFromRange(n);
                            return c.selectionFromDocument(t)
                        },
                        selectionFromDocument: function(n) {
                            return c.selectionFromWindow(t.windowFromDocument(n))
                        }
                    },
                    l = e.extend({
                        init: function(t) {
                            n.extend(this, {
                                ownerDocument: t,
                                startContainer: t,
                                endContainer: t,
                                commonAncestorContainer: t,
                                startOffset: 0,
                                endOffset: 0,
                                collapsed: !0
                            })
                        },
                        setStart: function(n, t) {
                            this.startContainer = n;
                            this.startOffset = t;
                            w(this);
                            p(this, !0)
                        },
                        setEnd: function(n, t) {
                            this.endContainer = n;
                            this.endOffset = t;
                            w(this);
                            p(this, !1)
                        },
                        setStartBefore: function(n) {
                            this.setStart(n.parentNode, u(n))
                        },
                        setStartAfter: function(n) {
                            this.setStart(n.parentNode, u(n) + 1)
                        },
                        setEndBefore: function(n) {
                            this.setEnd(n.parentNode, u(n))
                        },
                        setEndAfter: function(n) {
                            this.setEnd(n.parentNode, u(n) + 1)
                        },
                        selectNode: function(n) {
                            this.setStartBefore(n);
                            this.setEndAfter(n)
                        },
                        selectNodeContents: function(n) {
                            this.setStart(n, 0);
                            this.setEnd(n, n[1 === n.nodeType ? "childNodes" : "nodeValue"].length)
                        },
                        collapse: function(n) {
                            var t = this;
                            n ? t.setEnd(t.startContainer, t.startOffset) : t.setStart(t.endContainer, t.endOffset)
                        },
                        deleteContents: function() {
                            var n = this,
                                t = n.cloneRange();
                            n.startContainer != n.commonAncestorContainer && n.setStartAfter(h(n.commonAncestorContainer, n.startContainer));
                            n.collapse(!0),
                                function i(n) {
                                    for (; n.next();) n.hasPartialSubtree() ? i(n.getSubtreeIterator()) : n.remove()
                                }(new f(t))
                        },
                        cloneContents: function() {
                            var n = r.documentFromRange(this);
                            return function t(i) {
                                for (var r, u = n.createDocumentFragment(); r = i.next();) r = r.cloneNode(!i.hasPartialSubtree()), i.hasPartialSubtree() && r.appendChild(t(i.getSubtreeIterator())), u.appendChild(r);
                                return u
                            }(new f(this))
                        },
                        extractContents: function() {
                            var t, n = this,
                                i = n.cloneRange();
                            return n.startContainer != n.commonAncestorContainer && n.setStartAfter(h(n.commonAncestorContainer, n.startContainer)), n.collapse(!0), t = r.documentFromRange(n),
                                function u(i) {
                                    for (var r, f = t.createDocumentFragment(); r = i.next();) i.hasPartialSubtree() ? (r = r.cloneNode(!1), r.appendChild(u(i.getSubtreeIterator()))) : i.remove(n.originalRange), f.appendChild(r);
                                    return f
                                }(new f(i))
                        },
                        insertNode: function(n) {
                            var r = this;
                            i(r.startContainer) ? (r.startOffset != r.startContainer.nodeValue.length && t.splitDataNode(r.startContainer, r.startOffset), t.insertAfter(n, r.startContainer)) : t.insertAt(r.startContainer, n, r.startOffset);
                            r.setStart(r.startContainer, r.startOffset)
                        },
                        cloneRange: function() {
                            return n.extend(new l(this.ownerDocument), {
                                startContainer: this.startContainer,
                                endContainer: this.endContainer,
                                commonAncestorContainer: this.commonAncestorContainer,
                                startOffset: this.startOffset,
                                endOffset: this.endOffset,
                                collapsed: this.collapsed,
                                originalRange: this
                            })
                        },
                        toString: function() {
                            var n = this.startContainer.nodeName,
                                t = this.endContainer.nodeName;
                            return ("#text" == n ? this.startContainer.nodeValue : n) + "(" + this.startOffset + ") : " + ("#text" == t ? this.endContainer.nodeValue : t) + "(" + this.endOffset + ")"
                        }
                    }),
                    f = e.extend({
                        init: function(t) {
                            if (n.extend(this, {
                                    range: t,
                                    _current: null,
                                    _next: null,
                                    _end: null
                                }), !t.collapsed) {
                                var r = t.commonAncestorContainer;
                                this._next = t.startContainer != r || i(t.startContainer) ? h(r, t.startContainer) : t.startContainer.childNodes[t.startOffset];
                                this._end = t.endContainer != r || i(t.endContainer) ? h(r, t.endContainer).nextSibling : t.endContainer.childNodes[t.endOffset]
                            }
                        },
                        hasNext: function() {
                            return !!this._next
                        },
                        next: function() {
                            var n = this,
                                t = n._current = n._next;
                            return n._next = n._current && n._current.nextSibling != n._end ? n._current.nextSibling : null, i(n._current) && (n.range.endContainer == n._current && (t = t.cloneNode(!0), t.deleteData(n.range.endOffset, t.length - n.range.endOffset)), n.range.startContainer == n._current && (t = t.cloneNode(!0), t.deleteData(0, n.range.startOffset))), t
                        },
                        traverse: function(n) {
                            function r() {
                                return t._current = t._next, t._next = t._current && t._current.nextSibling != t._end ? t._current.nextSibling : null, t._current
                            }
                            for (var i, t = this; i = r();) t.hasPartialSubtree() ? t.getSubtreeIterator().traverse(n) : n(i);
                            return i
                        },
                        remove: function(n) {
                            var e, s, o, f, h, r = this,
                                c = r.range.startContainer == r._current,
                                l = r.range.endContainer == r._current;
                            i(r._current) && (c || l) ? (e = c ? r.range.startOffset : 0, s = l ? r.range.endOffset : r._current.length, o = s - e, n && (c || l) && (r._current == n.startContainer && n.startOffset >= e && (n.startOffset -= o), r._current == n.endContainer && n.endOffset >= s && (n.endOffset -= o)), r._current.deleteData(e, o)) : (f = r._current.parentNode, !n || r.range.startContainer != f && r.range.endContainer != f || (h = u(r._current), f == n.startContainer && n.startOffset >= h && (n.startOffset -= 1), f == n.endContainer && n.endOffset > h && (n.endOffset -= 1)), t.remove(r._current))
                        },
                        hasPartialSubtree: function() {
                            return !i(this._current) && (t.isAncestorOrSelf(this._current, this.range.startContainer) || t.isAncestorOrSelf(this._current, this.range.endContainer))
                        },
                        getSubtreeIterator: function() {
                            var n = this,
                                i = n.range.cloneRange();
                            return i.selectNodeContents(n._current), t.isAncestorOrSelf(n._current, n.range.startContainer) && i.setStart(n.range.startContainer, n.range.startOffset), t.isAncestorOrSelf(n._current, n.range.endContainer) && i.setEnd(n.range.endContainer, n.range.endOffset), new f(i)
                        }
                    }),
                    g = e.extend({
                        init: function(n) {
                            this.ownerDocument = n;
                            this.rangeCount = 1
                        },
                        addRange: function(n) {
                            var t = this.ownerDocument.body.createTextRange();
                            b(t, n, !1);
                            b(t, n, !0);
                            t.select()
                        },
                        removeAllRanges: function() {
                            var n = this.ownerDocument.selection;
                            "None" != n.type && n.empty()
                        },
                        getRangeAt: function() {
                            var f, c, o, t, r, e, s, h, n = new l(this.ownerDocument),
                                a = this.ownerDocument.selection;
                            try {
                                if (f = a.createRange(), c = f.item ? f.item(0) : f.parentElement(), c.ownerDocument != this.ownerDocument) return n
                            } catch (v) {
                                return n
                            }
                            if ("Control" == a.type) n.selectNode(f.item(0));
                            else if (o = it(f), k(f, n, o, !0), k(f, n, o, !1), 9 == n.startContainer.nodeType && n.setStart(n.endContainer, n.startOffset), 9 == n.endContainer.nodeType && n.setEnd(n.startContainer, n.endOffset), 0 === f.compareEndPoints("StartToEnd", f) && n.collapse(!1), t = n.startContainer, r = n.endContainer, e = this.ownerDocument.body, !(n.collapsed || 0 !== n.startOffset || n.endOffset != y(n.endContainer) || t == r && i(t) && t.parentNode == e)) {
                                for (s = !1, h = !1; 0 === u(t) && t == t.parentNode.firstChild && t != e;) t = t.parentNode, s = !0;
                                for (; u(r) == y(r.parentNode) - 1 && r == r.parentNode.lastChild && r != e;) r = r.parentNode, h = !0;
                                t == e && r == e && s && h && (n.setStart(t, 0), n.setEnd(r, y(e)))
                            }
                            return n
                        }
                    }),
                    nt = e.extend({
                        init: function(n) {
                            this.enumerate = function() {
                                function i(n) {
                                    if (t.is(n, "img") || 3 == n.nodeType && (!t.isWhitespace(n) || "﻿" == n.nodeValue)) r.push(n);
                                    else
                                        for (n = n.firstChild; n;) i(n), n = n.nextSibling
                                }
                                var r = [];
                                return new f(n).traverse(i), r
                            }
                        }
                    }),
                    ut = e.extend({
                        init: function(n, i) {
                            var u = this;
                            u.range = n;
                            u.rootNode = r.documentFromRange(n);
                            u.body = i || u.getEditable(n);
                            "body" != t.name(u.body) && (u.rootNode = u.body);
                            u.html = u.body.innerHTML;
                            u.startContainer = u.nodeToPath(n.startContainer);
                            u.endContainer = u.nodeToPath(n.endContainer);
                            u.startOffset = u.offset(n.startContainer, n.startOffset);
                            u.endOffset = u.offset(n.endContainer, n.endOffset)
                        },
                        index: function(n) {
                            for (var t, i = 0, r = n.nodeType; n = n.previousSibling;) t = n.nodeType, (3 != t || r != t) && i++, r = t;
                            return i
                        },
                        getEditable: function(n) {
                            for (var t = n.commonAncestorContainer; t && (3 == t.nodeType || t.attributes && !t.attributes.contentEditable);) t = t.parentNode;
                            return t
                        },
                        restoreHtml: function() {
                            this.body.innerHTML = this.html
                        },
                        offset: function(n, t) {
                            if (3 == n.nodeType)
                                for (;
                                    (n = n.previousSibling) && 3 == n.nodeType;) t += n.nodeValue.length;
                            return t
                        },
                        nodeToPath: function(n) {
                            for (var t = []; n != this.rootNode;) t.push(this.index(n)), n = n.parentNode;
                            return t
                        },
                        toRangePoint: function(n, t, i, r) {
                            for (var u = this.rootNode, e = i.length, f = r; e--;) u = u.childNodes[i[e]];
                            for (; u && 3 == u.nodeType && f > u.nodeValue.length;) f -= u.nodeValue.length, u = u.nextSibling;
                            u && f >= 0 && n[t ? "setStart" : "setEnd"](u, f)
                        },
                        toRange: function() {
                            var n = this,
                                t = n.range.cloneRange();
                            return n.toRangePoint(t, !0, n.startContainer, n.startOffset), n.toRangePoint(t, !1, n.endContainer, n.endOffset), t
                        }
                    }),
                    ft = e.extend({
                        init: function() {
                            this.caret = null
                        },
                        addCaret: function(n) {
                            var i = this;
                            return i.caret = t.create(r.documentFromRange(n), "span", {
                                className: "k-marker"
                            }), n.insertNode(i.caret), n.selectNode(i.caret), i.caret
                        },
                        removeCaret: function(n) {
                            var f, c, e, s, h = this,
                                r = h.caret.previousSibling,
                                l = 0;
                            r && (l = i(r) ? r.nodeValue.length : u(r));
                            f = h.caret.parentNode;
                            c = r ? u(r) : 0;
                            t.remove(h.caret);
                            o(f);
                            e = f.childNodes[c];
                            i(e) ? n.setStart(e, l) : e ? (s = t.lastTextNode(e), s ? n.setStart(s, s.nodeValue.length) : n[r ? "setStartAfter" : "setStartBefore"](e)) : (v.msie || f.innerHTML || (f.innerHTML = '<br _moz_dirty="" />'), n.selectNodeContents(f));
                            n.collapse(!0)
                        },
                        add: function(n, i) {
                            var f, e, u = this,
                                h = n.collapsed && !r.isExpandable(n),
                                s = r.documentFromRange(n);
                            return i && n.collapsed && (u.addCaret(n), n = r.expand(n)), f = n.cloneRange(), f.collapse(!1), u.end = t.create(s, "span", {
                                className: "k-marker"
                            }), f.insertNode(u.end), f = n.cloneRange(), f.collapse(!0), u.start = u.end.cloneNode(!0), f.insertNode(u.start), u._removeDeadMarkers(u.start, u.end), h && (e = s.createTextNode("﻿"), t.insertAfter(e.cloneNode(), u.start), t.insertBefore(e, u.end)), o(n.commonAncestorContainer), n.setStartBefore(u.start), n.setEndAfter(u.end), n
                        },
                        _removeDeadMarkers: function(n, i) {
                            n.previousSibling && "﻿" == n.previousSibling.nodeValue && t.remove(n.previousSibling);
                            i.nextSibling && "﻿" == i.nextSibling.nodeValue && t.remove(i.nextSibling)
                        },
                        _normalizedIndex: function(n) {
                            for (var i = u(n), t = n; t.previousSibling;) 3 == t.nodeType && 3 == t.previousSibling.nodeType && i--, t = t.previousSibling;
                            return i
                        },
                        remove: function(n) {
                            var v, y, b, e, h, s, c, l, a, p, w, f = this,
                                r = f.start,
                                u = f.end;
                            for (o(n.commonAncestorContainer); !r.nextSibling && r.parentNode;) r = r.parentNode;
                            for (; !u.previousSibling && u.parentNode;) u = u.parentNode;
                            if (v = r.previousSibling && 3 == r.previousSibling.nodeType && r.nextSibling && 3 == r.nextSibling.nodeType, y = u.previousSibling && 3 == u.previousSibling.nodeType && u.nextSibling && 3 == u.nextSibling.nodeType, b = v && y, r = r.nextSibling, u = u.previousSibling, e = !1, h = !1, r == f.end && (h = !!f.start.previousSibling, r = u = f.start.previousSibling || f.end.nextSibling, e = !0), t.remove(f.start), t.remove(f.end), !r || !u) return n.selectNodeContents(n.commonAncestorContainer), void n.collapse(!0);
                            if (s = e ? i(r) ? r.nodeValue.length : r.childNodes.length : 0, c = i(u) ? u.nodeValue.length : u.childNodes.length, 3 == r.nodeType)
                                for (; r.previousSibling && 3 == r.previousSibling.nodeType;) r = r.previousSibling, s += r.nodeValue.length;
                            if (3 == u.nodeType)
                                for (; u.previousSibling && 3 == u.previousSibling.nodeType;) u = u.previousSibling, c += u.nodeValue.length;
                            l = r.parentNode;
                            a = u.parentNode;
                            p = this._normalizedIndex(r);
                            w = this._normalizedIndex(u);
                            o(l);
                            3 == r.nodeType && (r = l.childNodes[p]);
                            o(a);
                            3 == u.nodeType && (u = a.childNodes[w]);
                            e ? (3 == r.nodeType ? n.setStart(r, s) : n[h ? "setStartAfter" : "setStartBefore"](r), n.collapse(!0)) : (3 == r.nodeType ? n.setStart(r, s) : n.setStartBefore(r), 3 == u.nodeType ? n.setEnd(u, c) : n.setEndAfter(u));
                            f.caret && f.removeCaret(n)
                        }
                    }),
                    a = /[\u0009-\u000d]|\u0020|\u00a0|\ufeff|\.|,|;|:|!|\(|\)|\?/,
                    r = {
                        nodes: function(n) {
                            var i = r.textNodes(n);
                            return i.length || (n.selectNodeContents(n.commonAncestorContainer), i = r.textNodes(n), i.length || (i = t.significantChildNodes(n.commonAncestorContainer))), i
                        },
                        textNodes: function(n) {
                            return new nt(n).enumerate()
                        },
                        documentFromRange: function(n) {
                            var t = n.startContainer;
                            return 9 == t.nodeType ? t : t.ownerDocument
                        },
                        createRange: function(n) {
                            return v.msie && 9 > v.version ? new l(n) : n.createRange()
                        },
                        selectRange: function(n) {
                            var t, i = r.image(n);
                            i && (n.setStartAfter(i), n.setEndAfter(i));
                            t = c.selectionFromRange(n);
                            t.removeAllRanges();
                            t.addRange(n)
                        },
                        stringify: function(n) {
                            return s.format("{0}:{1} - {2}:{3}", t.name(n.startContainer), n.startOffset, t.name(n.endContainer), n.endOffset)
                        },
                        split: function(n, i, r) {
                            function u(u) {
                                var f, e = n.cloneRange();
                                e.collapse(u);
                                e[u ? "setStartBefore" : "setEndAfter"](i);
                                f = e.extractContents();
                                r && (f = t.trim(f));
                                t[u ? "insertBefore" : "insertAfter"](f, i)
                            }
                            u(!0);
                            u(!1)
                        },
                        mapAll: function(t, i) {
                            var r = [];
                            return new f(t).traverse(function(t) {
                                var u = i(t);
                                u && n.inArray(u, r) < 0 && r.push(u)
                            }), r
                        },
                        getAll: function(n, i) {
                            var u = i;
                            return "string" == typeof i && (i = function(n) {
                                return t.is(n, u)
                            }), r.mapAll(n, function(n) {
                                if (i(n)) return n
                            })
                        },
                        getMarkers: function(n) {
                            return r.getAll(n, function(n) {
                                return "k-marker" == n.className
                            })
                        },
                        image: function(n) {
                            var t = r.getAll(n, "img");
                            if (1 == t.length) return t[0]
                        },
                        isStartOf: function(n, i) {
                            var r, u;
                            for (n = n.cloneRange(); 0 === n.startOffset && n.startContainer != i;) {
                                for (r = t.findNodeIndex(n.startContainer), u = n.startContainer.parentNode; r > 0 && t.insignificant(u[r - 1]);) r--;
                                n.setStart(u, r)
                            }
                            return 0 === n.startOffset && n.startContainer == i
                        },
                        isEndOf: function(n, i) {
                            function e(n) {
                                t.insignificant(n) || u.push(n)
                            }
                            var r, u;
                            return n = n.cloneRange(), n.collapse(!1), r = n.startContainer, t.isDataNode(r) && n.startOffset == t.getNodeLength(r) && (n.setStart(r.parentNode, t.findNodeIndex(r) + 1), n.collapse(!0)), n.setEnd(i, t.getNodeLength(i)), u = [], new f(n).traverse(e), !u.length
                        },
                        wrapSelectedElements: function(n) {
                            function i(n, i) {
                                var r, u = t.getNodeLength(i);
                                if (n == u) return !0;
                                for (r = n; u > r; r++)
                                    if (!t.insignificant(i.childNodes[r])) return !1;
                                return !0
                            }
                            for (var r = t.editableParent(n.startContainer), u = t.editableParent(n.endContainer); 0 === n.startOffset && n.startContainer != r;) n.setStart(n.startContainer.parentNode, t.findNodeIndex(n.startContainer));
                            for (; i(n.endOffset, n.endContainer) && n.endContainer != u;) n.setEnd(n.endContainer.parentNode, t.findNodeIndex(n.endContainer) + 1);
                            return n
                        },
                        expand: function(n) {
                            var f, e, r, u, t = n.cloneRange(),
                                o = t.startContainer.childNodes[0 === t.startOffset ? 0 : t.startOffset - 1],
                                s = t.endContainer.childNodes[t.endOffset];
                            return i(o) && i(s) ? (f = o.nodeValue, e = s.nodeValue, f && e ? (r = f.split("").reverse().join("").search(a), u = e.search(a), r && u ? (u = -1 == u ? e.length : u, r = -1 == r ? 0 : f.length - r, t.setStart(o, r), t.setEnd(s, u), t) : t) : t) : t
                        },
                        isExpandable: function(n) {
                            var t, i, u, f, e, o, s = n.startContainer,
                                h = r.documentFromRange(n);
                            return s == h || s == h.body ? !1 : (t = n.cloneRange(), (i = s.nodeValue) ? (u = i.substring(0, t.startOffset), f = i.substring(t.startOffset), e = 0, o = 0, u && (e = u.split("").reverse().join("").search(a)), f && (o = f.search(a)), e && o) : !1)
                        }
                    };
                rt(d, {
                    SelectionUtils: c,
                    W3CRange: l,
                    RangeIterator: f,
                    W3CSelection: g,
                    RangeEnumerator: nt,
                    RestorePoint: ut,
                    Marker: ft,
                    RangeUtils: r
                })
            }(window.kendo.jQuery)
        }(),
        function() {
            ! function(n) {
                function s(n, t) {
                    var i = n.selectionRestorePoint = new u(n.getRange()),
                        r = new p(t, i);
                    return r.editor = n, n.undoRedoStack.push(r), i
                }
                var f = window.kendo,
                    r = f.Class,
                    i = f.ui.editor,
                    h = i.EditorUtils,
                    a = h.registerTool,
                    t = i.Dom,
                    c = i.Tool,
                    v = i.ToolTemplate,
                    u = i.RestorePoint,
                    y = i.Marker,
                    l = n.extend,
                    e = r.extend({
                        init: function(n) {
                            this.options = n;
                            this.restorePoint = new u(n.range);
                            this.marker = new y;
                            this.formatter = n.formatter
                        },
                        getRange: function() {
                            return this.restorePoint.toRange()
                        },
                        lockRange: function(n) {
                            return this.marker.add(this.getRange(), n)
                        },
                        releaseRange: function(n) {
                            this.marker.remove(n);
                            this.editor.selectRange(n)
                        },
                        undo: function() {
                            var n = this.restorePoint;
                            n.restoreHtml();
                            this.editor.selectRange(n.toRange())
                        },
                        redo: function() {
                            this.exec()
                        },
                        createDialog: function(t, i) {
                            var r = this.editor;
                            return n(t).appendTo(document.body).kendoWindow(l({}, r.options.dialogOptions, i)).closest(".k-window").toggleClass("k-rtl", f.support.isRtl(r.wrapper)).end()
                        },
                        exec: function() {
                            var n = this.lockRange(!0);
                            this.formatter.editor = this.editor;
                            this.formatter.toggle(n);
                            this.releaseRange(n)
                        }
                    }),
                    p = r.extend({
                        init: function(n, t) {
                            this.body = n.body;
                            this.startRestorePoint = n;
                            this.endRestorePoint = t
                        },
                        redo: function() {
                            this.body.innerHTML = this.endRestorePoint.html;
                            this.editor.selectRange(this.endRestorePoint.toRange())
                        },
                        undo: function() {
                            this.body.innerHTML = this.startRestorePoint.html;
                            this.editor.selectRange(this.startRestorePoint.toRange())
                        }
                    }),
                    w = e.extend({
                        init: function(n) {
                            e.fn.init.call(this, n);
                            this.managesUndoRedo = !0
                        },
                        exec: function() {
                            var i, n = this.editor,
                                t = this.options,
                                r = t.range,
                                f = n.body,
                                e = new u(r, f),
                                o = t.html || t.value || "";
                            n.selectRange(r);
                            n.clipboard.paste(o, t);
                            t.postProcess && t.postProcess(n, n.getRange());
                            i = new p(e, new u(n.getRange(), f));
                            i.editor = n;
                            n.undoRedoStack.push(i);
                            n.focus()
                        }
                    }),
                    b = c.extend({
                        initialize: function(n, t) {
                            var r = t.editor,
                                u = this.options,
                                f = u.items ? u.items : r.options.insertHtml;
                            this._selectBox = new i.SelectBox(n, {
                                dataSource: f,
                                dataTextField: "text",
                                dataValueField: "value",
                                change: function() {
                                    c.exec(r, "insertHtml", this.value())
                                },
                                title: r.options.messages.insertHtml,
                                highlightFirst: !1
                            })
                        },
                        command: function(n) {
                            return new w(n)
                        },
                        update: function(n) {
                            var t = n.data("kendoSelectBox") || n.find("select").data("kendoSelectBox");
                            t.close();
                            t.value(t.options.title)
                        }
                    }),
                    it = r.extend({
                        init: function(n) {
                            this.editor = n
                        },
                        keydown: function(t) {
                            var o, i = this,
                                r = i.editor,
                                f = r.keyboard,
                                h = f.isTypingKey(t),
                                e = l(n.Event(), t);
                            return i.editor.trigger("keydown", e), e.isDefaultPrevented() ? (t.preventDefault(), !0) : e.isDefaultPrevented() || !h || f.isTypingInProgress() ? !1 : (o = r.getRange(), i.startRestorePoint = new u(o), f.startTyping(function() {
                                i.endRestorePoint = s(r, i.startRestorePoint)
                            }), !0)
                        },
                        keyup: function(n) {
                            var t = this.editor.keyboard;
                            return this.editor.trigger("keyup", n), t.isTypingInProgress() ? (t.endTyping(), !0) : !1
                        }
                    }),
                    rt = r.extend({
                        init: function(n) {
                            this.editor = n
                        },
                        _addCaret: function(n) {
                            var i = t.create(this.editor.document, "a");
                            return t.insertAt(n, i, 0), i
                        },
                        _restoreCaret: function(n) {
                            var i = this.editor.createRange();
                            i.setStartAfter(n);
                            i.collapse(!0);
                            this.editor.selectRange(i);
                            t.remove(n)
                        },
                        _handleDelete: function(n) {
                            var r, f, e = n.endContainer,
                                u = t.closestEditableOfType(e, t.blockElements);
                            return u && i.RangeUtils.isEndOf(n, u) ? (r = t.next(u), r && "p" == t.name(r) ? (f = this._addCaret(r), this._merge(u, r), this._restoreCaret(f), !0) : !1) : !1
                        },
                        _handleBackspace: function(n) {
                            var s, h, o, c, r = n.startContainer,
                                f = n.startOffset,
                                e = t.closestEditableOfType(r, ["li"]),
                                u = t.closestEditableOfType(r, "p,h1,h2,h3,h4,h5,h6".split(","));
                            if (t.isDataNode(r)) {
                                for (; f >= 0 && "﻿" == r.nodeValue[f - 1];) r.deleteData(f - 1, 1), f--;
                                n.setStart(r, Math.max(0, f));
                                n.collapse(!0);
                                this.editor.selectRange(n)
                            }
                            return u && u.previousSibling && i.RangeUtils.isStartOf(n, u) ? (s = u.previousSibling, h = this._addCaret(u), this._merge(s, u), this._restoreCaret(h), !0) : e && i.RangeUtils.isStartOf(n, e) ? (o = new i.GreedyBlockFormatter([{
                                tags: ["p"]
                            }]), c = e.firstChild, o.editor = this.editor, o.apply(e.childNodes), n.setStart(c, 0), this.editor.selectRange(n), !0) : !1
                        },
                        _handleSelection: function(r) {
                            var e, u, s, f = r.commonAncestorContainer,
                                o = t.closest(f, "table"),
                                h = i.emptyElementContent;
                            return /t(able|body)/i.test(t.name(f)) && r.selectNode(o), e = new y, e.add(r, !1), r.setStartAfter(e.start), r.setEndBefore(e.end), u = r.startContainer, s = r.endContainer, r.deleteContents(), o && "" === n(o).text() && (r.selectNode(o), r.deleteContents()), f = r.commonAncestorContainer, "p" === t.name(f) && "" === f.innerHTML && (f.innerHTML = h, r.setStart(f, 0)), this._join(u, s), t.insertAfter(this.editor.document.createTextNode("﻿"), e.start), e.remove(r), u = r.startContainer, "tr" == t.name(u) && (u = u.childNodes[Math.max(0, r.startOffset - 1)], r.setStart(u, t.getNodeLength(u))), r.collapse(!0), this.editor.selectRange(r), !0
                        },
                        _root: function(n) {
                            for (; n && n.parentNode && "body" != t.name(n.parentNode);) n = n.parentNode;
                            return n
                        },
                        _join: function(n, i) {
                            n = this._root(n);
                            i = this._root(i);
                            n != i && t.is(i, "p") && this._merge(n, i)
                        },
                        _merge: function(n, i) {
                            for (t.removeTrailingBreak(n); i.firstChild;) 1 == n.nodeType ? n.appendChild(i.firstChild) : n.parentNode.appendChild(i.firstChild);
                            t.remove(i)
                        },
                        keydown: function(n) {
                            var t, r, i = this.editor.getRange(),
                                e = n.keyCode,
                                o = f.keys,
                                h = e === o.BACKSPACE,
                                c = e == o.DELETE;
                            !h && !c || i.collapsed ? h ? t = "_handleBackspace" : c && (t = "_handleDelete") : t = "_handleSelection";
                            t && (r = new u(i), this[t](i) && (n.preventDefault(), s(this.editor, r)))
                        },
                        keyup: n.noop
                    }),
                    ut = r.extend({
                        init: function(n) {
                            this.editor = n;
                            this.systemCommandIsInProgress = !1
                        },
                        createUndoCommand: function() {
                            this.startRestorePoint = this.endRestorePoint = s(this.editor, this.startRestorePoint)
                        },
                        changed: function() {
                            return this.startRestorePoint ? this.startRestorePoint.html != this.editor.body.innerHTML : !1
                        },
                        keydown: function(n) {
                            var t = this,
                                r = t.editor,
                                i = r.keyboard;
                            return i.isModifierKey(n) ? (i.isTypingInProgress() && i.endTyping(!0), t.startRestorePoint = new u(r.getRange()), !0) : i.isSystem(n) ? (t.systemCommandIsInProgress = !0, t.changed() && (t.systemCommandIsInProgress = !1, t.createUndoCommand()), !0) : !1
                        },
                        keyup: function() {
                            var n = this;
                            return n.systemCommandIsInProgress && n.changed() ? (n.systemCommandIsInProgress = !1, n.createUndoCommand(), !0) : !1
                        }
                    }),
                    ft = r.extend({
                        init: function(n) {
                            this.handlers = n;
                            this.typingInProgress = !1
                        },
                        isCharacter: function(n) {
                            return n >= 48 && 90 >= n || n >= 96 && 111 >= n || n >= 186 && 192 >= n || n >= 219 && 222 >= n || 229 == n
                        },
                        toolFromShortcut: function(t, i) {
                            var u, r, f = String.fromCharCode(i.keyCode);
                            for (u in t)
                                if (r = n.extend({
                                        ctrl: !1,
                                        alt: !1,
                                        shift: !1
                                    }, t[u].options), (r.key == f || r.key == i.keyCode) && r.ctrl == i.ctrlKey && r.alt == i.altKey && r.shift == i.shiftKey) return u
                        },
                        isTypingKey: function(n) {
                            var t = n.keyCode;
                            return this.isCharacter(t) && !n.ctrlKey && !n.altKey || 32 == t || 13 == t || 8 == t || 46 == t && !n.shiftKey && !n.ctrlKey && !n.altKey
                        },
                        isModifierKey: function(n) {
                            var t = n.keyCode;
                            return 17 == t && !n.shiftKey && !n.altKey || 16 == t && !n.ctrlKey && !n.altKey || 18 == t && !n.ctrlKey && !n.shiftKey
                        },
                        isSystem: function(n) {
                            return 46 == n.keyCode && n.ctrlKey && !n.altKey && !n.shiftKey
                        },
                        startTyping: function(n) {
                            this.onEndTyping = n;
                            this.typingInProgress = !0
                        },
                        stopTyping: function() {
                            this.typingInProgress && this.onEndTyping && this.onEndTyping();
                            this.typingInProgress = !1
                        },
                        endTyping: function(t) {
                            var i = this;
                            i.clearTimeout();
                            t ? i.stopTyping() : i.timeout = window.setTimeout(n.proxy(i.stopTyping, i), 1e3)
                        },
                        isTypingInProgress: function() {
                            return this.typingInProgress
                        },
                        clearTimeout: function() {
                            window.clearTimeout(this.timeout)
                        },
                        notify: function(n, t) {
                            for (var r = this.handlers, i = 0; r.length > i && !r[i][t](n); i++);
                        },
                        keydown: function(n) {
                            this.notify(n, "keydown")
                        },
                        keyup: function(n) {
                            this.notify(n, "keyup")
                        }
                    }),
                    et = r.extend({
                        init: function(n) {
                            this.editor = n;
                            this.cleaners = [new ot, new k, new d, new g]
                        },
                        htmlToFragment: function(n) {
                            var f = this.editor,
                                r = f.document,
                                i = t.create(r, "div"),
                                u = r.createDocumentFragment();
                            for (i.innerHTML = n; i.firstChild;) u.appendChild(i.firstChild);
                            return u
                        },
                        isBlock: function(n) {
                            return /<(div|p|ul|ol|table|h[1-6])/i.test(n)
                        },
                        _startModification: function() {
                            var n, i, r = this.editor;
                            if (!this._inProgress) return this._inProgress = !0, n = r.getRange(), i = new u(n), t.persistScrollTop(r.document), {
                                range: n,
                                restorePoint: i
                            }
                        },
                        _endModification: function(n) {
                            s(this.editor, n.restorePoint);
                            this.editor._selectionChange();
                            this._inProgress = !1
                        },
                        _contentModification: function(n, t) {
                            var i = this,
                                u = i.editor,
                                r = i._startModification();
                            r && (n.call(i, u, r.range), setTimeout(function() {
                                t.call(i, u, r.range);
                                i._endModification(r)
                            }))
                        },
                        oncut: function() {
                            this._contentModification(n.noop, n.noop)
                        },
                        _fileToDataURL: function(t) {
                            var i = n.Deferred(),
                                r = new FileReader;
                            return t instanceof window.File || !t.getAsFile || (t = t.getAsFile()), r.onload = n.proxy(i.resolve, i), r.readAsDataURL(t), i.promise()
                        },
                        _triggerPaste: function(n, t) {
                            var i = {
                                html: n || ""
                            };
                            i.html = i.html.replace(/\ufeff/g, "");
                            this.editor.trigger("paste", i);
                            this.paste(i.html, t || {})
                        },
                        _handleImagePaste: function(t) {
                            var i, u, r, f;
                            if ("FileReader" in window && (i = t.clipboardData || t.originalEvent.clipboardData || window.clipboardData, u = i && (i.items || i.files), r = u && n.grep(u, function(n) {
                                    return /^image\//i.test(n.type)
                                }), r && r.length && (f = this._startModification()))) return n.when.apply(n, n.map(r, this._fileToDataURL)).done(n.proxy(function() {
                                var t = Array.prototype.slice.call(arguments),
                                    i = n.map(t, function(n) {
                                        return '<img src="' + n.target.result + '" />'
                                    }).join("");
                                this._triggerPaste(i);
                                this._endModification(f)
                            }, this)), !0
                        },
                        onpaste: function(i) {
                            return this._handleImagePaste(i) ? void i.preventDefault() : void this._contentModification(function(r, u) {
                                var o, s, h, e = t.create(r.document, "div", {
                                        className: "k-paste-container",
                                        innerHTML: "﻿"
                                    }),
                                    c = f.support.browser;
                                r.body.appendChild(e);
                                c.msie && 11 > c.version ? (i.preventDefault(), o = r.createRange(), o.selectNodeContents(e), r.selectRange(o), s = r.document.body.createTextRange(), s.moveToElementText(e), n(r.body).unbind("paste"), s.execCommand("Paste"), n(r.body).bind("paste", n.proxy(this.onpaste, this))) : (h = r.createRange(), h.selectNodeContents(e), r.selectRange(h));
                                u.deleteContents()
                            }, function(i, r) {
                                var u, f = "";
                                i.selectRange(r);
                                u = n(i.body).children(".k-paste-container");
                                u.each(function() {
                                    var n = this.lastChild;
                                    n && t.is(n, "br") && t.remove(n);
                                    f += this.innerHTML
                                });
                                u.remove();
                                this._triggerPaste(f, {
                                    clean: !0
                                })
                            })
                        },
                        splittableParent: function(n, i) {
                            var r, u;
                            if (n) return t.closestEditableOfType(i, ["p", "ul", "ol"]) || i.parentNode;
                            if (r = i.parentNode, u = i.ownerDocument.body, t.isInline(r))
                                for (; r.parentNode != u && !t.isBlock(r.parentNode);) r = r.parentNode;
                            return r
                        },
                        paste: function(r, u) {
                            var e, a, v, f, p, o, h, w, d, s, b, k, c = this.editor;
                            for (u = l({
                                    clean: !1,
                                    split: !0
                                }, u), e = 0, a = this.cleaners.length; a > e; e++) this.cleaners[e].applicable(r) && (r = this.cleaners[e].clean(r));
                            if (u.clean && (r = r.replace(/(<br>(\s|&nbsp;)*)+(<\/?(div|p|li|col|t))/gi, "$3"), r = r.replace(/<(a|span)[^>]*><\/\1>/gi, "")), r = r.replace(/^<li/i, "<ul><li").replace(/li>$/g, "li><\/ul>"), v = this.isBlock(r), c.focus(), f = c.getRange(), f.deleteContents(), f.startContainer == c.document && f.selectNodeContents(c.body), p = new y, o = p.addCaret(f), h = this.splittableParent(v, o), w = !1, d = h != c.body && !t.is(h, "td"), u.split && d && (v || t.isInline(h)) && (f.selectNode(o), i.RangeUtils.split(f, h, !0), w = !0), s = this.htmlToFragment(r), s.firstChild && "k-paste-container" === s.firstChild.className) {
                                for (b = [], e = 0, a = s.childNodes.length; a > e; e++) b.push(s.childNodes[e].innerHTML);
                                s = this.htmlToFragment(b.join("<br />"))
                            }
                            if (n(s.childNodes).filter("table").addClass("k-table").end().find("table").addClass("k-table"), f.insertNode(s), h = this.splittableParent(v, o), w) {
                                for (; o.parentNode != h;) t.unwrap(o.parentNode);
                                t.unwrap(o.parentNode)
                            }
                            t.normalize(f.commonAncestorContainer);
                            o.style.display = "inline";
                            t.restoreScrollTop(c.document);
                            t.scrollTo(o);
                            p.removeCaret(f);
                            k = f.commonAncestorContainer.parentNode;
                            f.collapsed && "tbody" == t.name(k) && (f.setStartAfter(n(k).closest("table")[0]), f.collapse(!0));
                            c.selectRange(f)
                        }
                    }),
                    o = r.extend({
                        clean: function(n) {
                            for (var u = this, i = u.replacements, t = 0, r = i.length; r > t; t += 2) n = n.replace(i[t], i[t + 1]);
                            return n
                        }
                    }),
                    ot = o.extend({
                        init: function() {
                            this.replacements = [/<(\/?)script([^>]*)>/i, "<$1telerik:script$2>"]
                        },
                        applicable: function(n) {
                            return /<script[^>]*>/i.test(n)
                        }
                    }),
                    k = o.extend({
                        init: function() {
                            var n = " ";
                            this.replacements = [/<span\s+class="Apple-tab-span"[^>]*>\s*<\/span>/gi, n, /\t/gi, n, /&nbsp;&nbsp; &nbsp;/gi, n]
                        },
                        applicable: function(n) {
                            return /&nbsp;&nbsp; &nbsp;|class="?Apple-tab-span/i.test(n)
                        }
                    }),
                    d = o.extend({
                        init: function() {
                            this.replacements = [/<\?xml[^>]*>/gi, "", /<!--(.|\n)*?-->/g, "", /&quot;/g, "'", /(?:<br>&nbsp;[\s\r\n]+|<br>)*(<\/?(h[1-6]|hr|p|div|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|address|pre|form|blockquote|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br>&nbsp;[\s\r\n]+|<br>)*/g, "$1", /<br><br>/g, "<BR><BR>", /<br>(?!\n)/g, " ", /<table([^>]*)>(\s|&nbsp;)+<t/gi, "<table$1><t", /<tr[^>]*>(\s|&nbsp;)*<\/tr>/gi, "", /<tbody[^>]*>(\s|&nbsp;)*<\/tbody>/gi, "", /<table[^>]*>(\s|&nbsp;)*<\/table>/gi, "", /<BR><BR>/g, "<br>", /^\s*(&nbsp;)+/gi, "", /(&nbsp;|<br[^>]*>)+\s*$/gi, "", /mso-[^;"]*;?/gi, "", /<(\/?)b(\s[^>]*)?>/gi, "<$1strong$2>", /<(\/?)font(\s[^>]*)?>/gi, this.convertFontMatch, /<(\/?)i(\s[^>]*)?>/gi, "<$1em$2>", /<o:p>&nbsp;<\/o:p>/gi, "&nbsp;", /<\/?(meta|link|style|o:|v:|x:)[^>]*>((?:.|\n)*?<\/(meta|link|style|o:|v:|x:)[^>]*>)?/gi, "", /<\/o>/g, "", /style=(["|'])\s*\1/g, "", /(<br[^>]*>)?\n/g, function(n, t) {
                                return t ? n : " "
                            }]
                        },
                        convertFontMatch: function(n, t, i) {
                            var r = /face=['"]([^'"]+)['"]/i.exec(i),
                                u = i && r && r[1];
                            return t ? "<\/span>" : u ? '<span style="font-family:' + u + '">' : "<span>"
                        },
                        applicable: function(n) {
                            return /class="?Mso/i.test(n) || /style="[^"]*mso-/i.test(n) || /urn:schemas-microsoft-com:office/.test(n)
                        },
                        stripEmptyAnchors: function(n) {
                            return n.replace(/<a([^>]*)>\s*<\/a>/gi, function(n, t) {
                                return !t || t.indexOf("href") < 0 ? "" : n
                            })
                        },
                        listType: function(n) {
                            var t;
                            return /^(<span [^>]*texhtml[^>]*>)?<span [^>]*(Symbol|Wingdings)[^>]*>/i.test(n) && (t = !0), n = n.replace(/<\/?\w+[^>]*>/g, "").replace(/&nbsp;/g, "Â "), !t && /^[\u2022\u00b7\u00a7\u00d8o]\u00a0+/.test(n) || t && /^.\u00a0+/.test(n) ? "ul" : /^\s*\w+[\.\)]\u00a0{2,}/.test(n) ? "ol" : void 0
                        },
                        _convertToLi: function(n) {
                            var i;
                            return 1 == n.childNodes.length ? i = n.firstChild.innerHTML.replace(/^\w+[\.\)](&nbsp;)+ /, "") : (t.remove(n.firstChild), 3 == n.firstChild.nodeType && /^[ivx]+\.$/i.test(n.firstChild.nodeValue) && t.remove(n.firstChild), /^(&nbsp;|\s)+$/i.test(n.firstChild.innerHTML) && t.remove(n.firstChild), i = n.innerHTML), t.remove(n), t.create(document, "li", {
                                innerHTML: i
                            })
                        },
                        lists: function(i) {
                            for (var y, l, r, f, o, u, c, a, p = n(t.blockElements.join(","), i), v = -1, e = {
                                    ul: {},
                                    ol: {}
                                }, s = i, h = 0; p.length > h; h++)
                                if (r = p[h], f = this.listType(r.innerHTML), l = t.name(r), "td" != l)
                                    if (f && "p" == l) {
                                        if (o = parseFloat(r.style.marginLeft || 0), u = e[f][o], (o > v || !u) && (u = t.create(document, f), s == i ? t.insertBefore(u, r) : s.appendChild(u), e[f][o] = u), y != f)
                                            for (c in e)
                                                for (a in e[c]) n.contains(u, e[c][a]) && delete e[c][a];
                                        s = this._convertToLi(r);
                                        u.appendChild(s);
                                        v = o;
                                        y = f
                                    } else r.innerHTML ? (e = {
                                        ul: {},
                                        ol: {}
                                    }, s = i, v = -1) : t.remove(r)
                        },
                        removeAttributes: function(n) {
                            for (var i = n.attributes, r = i.length; r--;) "colspan" != t.name(i[r]) && n.removeAttributeNode(i[r])
                        },
                        createColGroup: function(t) {
                            var r = t.cells,
                                u = n(t).closest("table"),
                                i = u.children("colgroup");
                            2 > r.length || (i.length && (r = i.children(), i[0].parentNode.removeChild(i[0])), i = n(n.map(r, function(n) {
                                var t = n.width;
                                return t && 0 !== parseInt(t, 10) ? f.format('<col style="width:{0}px;"/>', t) : "<col />"
                            }).join("")), i.is("colgroup") || (i = n("<colgroup/>").append(i)), i.prependTo(u))
                        },
                        convertHeaders: function(i) {
                            var r, u = i.cells,
                                f = n.map(u, function(i) {
                                    var r = n(i).children("p").children("strong")[0];
                                    if (r && "strong" == t.name(r)) return r
                                });
                            if (f.length == u.length) {
                                for (r = 0; f.length > r; r++) t.unwrap(f[r]);
                                for (n(i).closest("table").find("colgroup").after("<thead><\/thead>").end().find("thead").append(i), r = 0; u.length > r; r++) t.changeTag(u[r], "th")
                            }
                        },
                        removeParagraphs: function(i) {
                            for (var r, e, o, f, u = 0; i.length > u; u++)
                                for (this.removeAttributes(i[u]), o = n(i[u]), f = o.children("p"), r = 0, e = f.length; e > r; r++) e - 1 > r && t.insertAfter(t.create(document, "br"), f[r]), t.unwrap(f[r])
                        },
                        removeDefaultColors: function(n) {
                            for (var i = 0; n.length > i; i++) /^\s*color:\s*[^;]*;?$/i.test(n[i].style.cssText) && t.unwrap(n[i])
                        },
                        tables: function(t) {
                            for (var r, s, o, u, f = n(t).find("table"), e = this, i = 0; f.length > i; i++) {
                                for (r = f[i].rows, o = s = r[0], u = 1; r.length > u; u++) r[u].cells.length > o.cells.length && (o = r[u]);
                                e.createColGroup(o);
                                e.convertHeaders(s);
                                e.removeAttributes(f[i]);
                                e.removeParagraphs(f.eq(i).find("td,th"));
                                e.removeDefaultColors(f.eq(i).find("span"))
                            }
                        },
                        headers: function(i) {
                            for (var u = n(i).find("p.MsoTitle"), r = 0; u.length > r; r++) t.changeTag(u[r], "h1")
                        },
                        clean: function(n) {
                            var i, r = this;
                            return n = o.fn.clean.call(r, n), n = r.stripEmptyAnchors(n), i = t.create(document, "div", {
                                innerHTML: n
                            }), r.headers(i), r.lists(i), r.tables(i), n = i.innerHTML.replace(/(<[^>]*)\s+class="?[^"\s>]*"?/gi, "$1")
                        }
                    }),
                    g = o.extend({
                        init: function() {
                            this.replacements = [/\s+class="Apple-style-span[^"]*"/gi, "", /<(div|p|h[1-6])\s+style="[^"]*"/gi, "<$1", /^<div>(.*)<\/div>$/, "$1"]
                        },
                        applicable: function(n) {
                            return /class="?Apple-style-span|style="[^"]*-webkit-nbsp-mode/i.test(n)
                        }
                    }),
                    nt = e.extend({
                        init: function(n) {
                            e.fn.init.call(this, n);
                            this.managesUndoRedo = !0
                        },
                        exec: function() {
                            var n = this.editor;
                            f.support.browser.msie ? n.document.execCommand("print", !1, null) : n.window.print && n.window.print()
                        }
                    }),
                    tt = e.extend({
                        init: function(n) {
                            this.async = !0;
                            e.fn.init.call(this, n)
                        },
                        exec: function() {
                            var n = this,
                                t = this.lockRange(!0);
                            this.editor.saveAsPDF().then(function() {
                                n.releaseRange(t)
                            })
                        }
                    });
                l(i, {
                    _finishUpdate: s,
                    Command: e,
                    GenericCommand: p,
                    InsertHtmlCommand: w,
                    InsertHtmlTool: b,
                    TypingHandler: it,
                    SystemHandler: ut,
                    BackspaceHandler: rt,
                    Keyboard: ft,
                    Clipboard: et,
                    Cleaner: o,
                    TabCleaner: k,
                    MSWordFormatCleaner: d,
                    WebkitFormatCleaner: g,
                    PrintCommand: nt,
                    ExportPdfCommand: tt
                });
                a("insertHtml", new b({
                    template: new v({
                        template: h.dropDownListTemplate,
                        title: "Insert HTML",
                        initialValue: "Insert HTML"
                    })
                }));
                a("print", new c({
                    command: nt,
                    template: new v({
                        template: h.buttonTemplate,
                        title: "Print"
                    })
                }));
                a("pdf", new c({
                    command: tt,
                    template: new v({
                        template: h.buttonTemplate,
                        title: "Export PDF"
                    })
                }))
            }(window.kendo.jQuery)
        }(),
        function() {
            ! function(n) {
                var e = window.kendo,
                    g = e.Class,
                    i = e.ui.editor,
                    s = e.ui.Editor.fn.options.formats,
                    r = i.EditorUtils,
                    h = i.Tool,
                    u = i.ToolTemplate,
                    nt = i.FormatTool,
                    t = i.Dom,
                    b = i.RangeUtils,
                    c = n.extend,
                    f = i.EditorUtils.registerTool,
                    l = i.EditorUtils.registerFormat,
                    v = "k-marker",
                    a = g.extend({
                        init: function(n) {
                            this.format = n
                        },
                        numberOfSiblings: function(n) {
                            for (var r = 0, u = 0, f = 0, i = n.parentNode, t = i.firstChild; t; t = t.nextSibling) t != n && (t.className == v ? f++ : 3 == t.nodeType ? r++ : u++);
                            return f > 1 && i.firstChild.className == v && i.lastChild.className == v ? 0 : u + r
                        },
                        findSuitable: function(n, i) {
                            var r, u;
                            if (!i && this.numberOfSiblings(n) > 0) return null;
                            for (r = n.parentNode, u = this.format[0].tags; !t.ofType(r, u);) {
                                if (this.numberOfSiblings(r) > 0) return null;
                                r = r.parentNode
                            }
                            return r
                        },
                        findFormat: function(n) {
                            for (var i, u, f, e = this.format, s = t.attrEquals, r = 0, o = e.length; o > r; r++) {
                                if (i = n, u = e[r].tags, f = e[r].attr, i && t.ofType(i, u) && s(i, f)) return i;
                                for (; i;)
                                    if (i = t.parentOfType(i, u), i && s(i, f)) return i
                            }
                            return null
                        },
                        isFormatted: function(n) {
                            for (var t = 0, i = n.length; i > t; t++)
                                if (this.findFormat(n[t])) return !0;
                            return !1
                        }
                    }),
                    y = g.extend({
                        init: function(n, t) {
                            this.finder = new a(n);
                            this.attributes = c({}, n[0].attr, t);
                            this.tag = n[0].tags[0]
                        },
                        wrap: function(n) {
                            return t.wrap(n, t.create(n.ownerDocument, this.tag, this.attributes))
                        },
                        activate: function(n, t) {
                            this.finder.isFormatted(t) ? (this.split(n), this.remove(t)) : this.apply(t)
                        },
                        toggle: function(n) {
                            var t = b.textNodes(n);
                            t.length > 0 && this.activate(n, t)
                        },
                        apply: function(n) {
                            for (var i, u, e = [], r = 0, f = n.length; f > r; r++) {
                                if (i = n[r], u = this.finder.findSuitable(i)) t.attr(u, this.attributes);
                                else {
                                    for (; !t.isBlock(i.parentNode) && 1 == i.parentNode.childNodes.length;) i = i.parentNode;
                                    u = this.wrap(i)
                                }
                                e.push(u)
                            }
                            this.consolidate(e)
                        },
                        remove: function(n) {
                            for (var i, r = 0, u = n.length; u > r; r++) i = this.finder.findFormat(n[r]), i && (this.attributes && this.attributes.style ? (t.unstyle(i, this.attributes.style), i.style.cssText || i.attributes["class"] || t.unwrap(i)) : t.unwrap(i))
                        },
                        split: function(n) {
                            var t, i, r = b.textNodes(n),
                                u = r.length;
                            if (u > 0)
                                for (t = 0; u > t; t++) i = this.finder.findFormat(r[t]), i && b.split(n, i, !0)
                        },
                        consolidate: function(n) {
                            for (var i, r; n.length > 1;)
                                if (i = n.pop(), r = n[n.length - 1], i.previousSibling && i.previousSibling.className == v && r.appendChild(i.previousSibling), i.tagName == r.tagName && i.previousSibling == r && i.style.cssText == r.style.cssText) {
                                    for (; i.firstChild;) r.appendChild(i.firstChild);
                                    t.remove(i)
                                }
                        }
                    }),
                    p = a.extend({
                        init: function(n, t) {
                            this.format = n;
                            this.greedyProperty = t;
                            a.fn.init.call(this, n)
                        },
                        getInlineCssValue: function(i) {
                            var r, v, u, y, p, e, o, f, w, s, h, c, l = i.attributes,
                                a = n.trim;
                            if (l)
                                for (r = 0, v = l.length; v > r; r++)
                                    if (u = l[r], y = u.nodeName, p = u.nodeValue, u.specified && "style" == y)
                                        for (e = a(p || i.style.cssText).split(";"), f = 0, w = e.length; w > f; f++)
                                            if (o = e[f], o.length) {
                                                if (s = o.split(":"), h = a(s[0].toLowerCase()), c = a(s[1]), h != this.greedyProperty) continue;
                                                return h.indexOf("color") >= 0 ? t.toHex(c) : c
                                            }
                        },
                        getFormatInner: function(i) {
                            for (var e, o = n(t.isDataNode(i) ? i.parentNode : i), u = o.parentsUntil("[contentEditable]").addBack().toArray().reverse(), r = 0, f = u.length; f > r; r++)
                                if (e = "className" == this.greedyProperty ? u[r].className : this.getInlineCssValue(u[r])) return e;
                            return "inherit"
                        },
                        getFormat: function(n) {
                            for (var r = this.getFormatInner(n[0]), t = 1, i = n.length; i > t; t++)
                                if (r != this.getFormatInner(n[t])) return "";
                            return r
                        },
                        isFormatted: function(n) {
                            return "" !== this.getFormat(n)
                        }
                    }),
                    k = y.extend({
                        init: function(n, t, i) {
                            y.fn.init.call(this, n, t);
                            this.values = t;
                            this.finder = new p(n, i);
                            i && (this.greedyProperty = e.toCamelCase(i))
                        },
                        activate: function(n, t) {
                            var i = this.greedyProperty,
                                r = "apply";
                            this.split(n);
                            i && "inherit" == this.values.style[i] && (r = "remove");
                            this[r](t)
                        }
                    }),
                    o = nt.extend({
                        init: function(n) {
                            nt.fn.init.call(this, c(n, {
                                finder: new a(n.format),
                                formatter: function() {
                                    return new y(n.format)
                                }
                            }))
                        }
                    }),
                    tt = h.extend({
                        update: function(n, t) {
                            var i = n.data(this.type);
                            i.close();
                            i.value(this.finder.getFormat(t))
                        }
                    }),
                    d = tt.extend({
                        init: function(n) {
                            h.fn.init.call(this, n);
                            this.type = e.support.browser.msie || e.support.touch ? "kendoDropDownList" : "kendoComboBox";
                            this.format = [{
                                tags: ["span"]
                            }];
                            this.finder = new p(this.format, n.cssAttr)
                        },
                        command: function(n) {
                            var t = this.options,
                                u = this.format,
                                r = {};
                            return new i.FormatCommand(c(n, {
                                formatter: function() {
                                    return r[t.domAttr] = n.value, new k(u, {
                                        style: r
                                    }, t.cssAttr)
                                }
                            }))
                        },
                        initialize: function(n, t) {
                            var f, r = t.editor,
                                i = this.options,
                                u = i.name,
                                e = [];
                            i.defaultValue && (e = [{
                                text: r.options.messages[i.defaultValue[0].text],
                                value: i.defaultValue[0].value
                            }]);
                            f = e.concat(i.items ? i.items : r.options[u] || []);
                            n[this.type]({
                                dataTextField: "text",
                                dataValueField: "value",
                                dataSource: f,
                                change: function() {
                                    h.exec(r, u, this.value())
                                },
                                highlightFirst: !1
                            });
                            n.closest(".k-widget").removeClass("k-" + u).find("*").addBack().attr("unselectable", "on");
                            n.data(this.type).value("inherit")
                        }
                    }),
                    w = h.extend({
                        init: function(n) {
                            h.fn.init.call(this, n);
                            this.format = [{
                                tags: ["span"]
                            }];
                            this.finder = new p(this.format, n.cssAttr)
                        },
                        options: {
                            palette: "websafe"
                        },
                        update: function() {
                            this._widget.close()
                        },
                        command: function(n) {
                            var t = this.options,
                                u = this.format,
                                r = {};
                            return new i.FormatCommand(c(n, {
                                formatter: function() {
                                    return r[t.domAttr] = n.value, new k(u, {
                                        style: r
                                    }, t.cssAttr)
                                }
                            }))
                        },
                        initialize: function(n, t) {
                            var i = t.editor,
                                u = this.name,
                                r = c({}, w.fn.options, this.options),
                                f = r.palette;
                            n = this._widget = new e.ui.ColorPicker(n, {
                                toolIcon: "k-" + r.name,
                                palette: f,
                                change: function() {
                                    var t = n.value();
                                    t && h.exec(i, u, t);
                                    i.focus()
                                },
                                activate: function(t) {
                                    t.preventDefault();
                                    n.trigger("change")
                                }
                            });
                            n.wrapper.attr({
                                title: t.title,
                                unselectable: "on"
                            }).find("*").attr("unselectable", "on")
                        }
                    });
                c(i, {
                    InlineFormatFinder: a,
                    InlineFormatter: y,
                    DelayedExecutionTool: tt,
                    GreedyInlineFormatFinder: p,
                    GreedyInlineFormatter: k,
                    InlineFormatTool: o,
                    FontTool: d,
                    ColorTool: w
                });
                l("bold", [{
                    tags: ["strong", "b"]
                }, {
                    tags: ["span"],
                    attr: {
                        style: {
                            fontWeight: "bold"
                        }
                    }
                }]);
                f("bold", new o({
                    key: "B",
                    ctrl: !0,
                    format: s.bold,
                    template: new u({
                        template: r.buttonTemplate,
                        title: "Bold"
                    })
                }));
                l("italic", [{
                    tags: ["em", "i"]
                }, {
                    tags: ["span"],
                    attr: {
                        style: {
                            fontStyle: "italic"
                        }
                    }
                }]);
                f("italic", new o({
                    key: "I",
                    ctrl: !0,
                    format: s.italic,
                    template: new u({
                        template: r.buttonTemplate,
                        title: "Italic"
                    })
                }));
                l("underline", [{
                    tags: ["span"],
                    attr: {
                        style: {
                            textDecoration: "underline"
                        }
                    }
                }, {
                    tags: ["u"]
                }]);
                f("underline", new o({
                    key: "U",
                    ctrl: !0,
                    format: s.underline,
                    template: new u({
                        template: r.buttonTemplate,
                        title: "Underline"
                    })
                }));
                l("strikethrough", [{
                    tags: ["del", "strike"]
                }, {
                    tags: ["span"],
                    attr: {
                        style: {
                            textDecoration: "line-through"
                        }
                    }
                }]);
                f("strikethrough", new o({
                    format: s.strikethrough,
                    template: new u({
                        template: r.buttonTemplate,
                        title: "Strikethrough"
                    })
                }));
                l("superscript", [{
                    tags: ["sup"]
                }]);
                f("superscript", new o({
                    format: s.superscript,
                    template: new u({
                        template: r.buttonTemplate,
                        title: "Superscript"
                    })
                }));
                l("subscript", [{
                    tags: ["sub"]
                }]);
                f("subscript", new o({
                    format: s.subscript,
                    template: new u({
                        template: r.buttonTemplate,
                        title: "Subscript"
                    })
                }));
                f("foreColor", new w({
                    cssAttr: "color",
                    domAttr: "color",
                    name: "foreColor",
                    template: new u({
                        template: r.colorPickerTemplate,
                        title: "Color"
                    })
                }));
                f("backColor", new w({
                    cssAttr: "background-color",
                    domAttr: "backgroundColor",
                    name: "backColor",
                    template: new u({
                        template: r.colorPickerTemplate,
                        title: "Background Color"
                    })
                }));
                f("fontName", new d({
                    cssAttr: "font-family",
                    domAttr: "fontFamily",
                    name: "fontName",
                    defaultValue: [{
                        text: "fontNameInherit",
                        value: "inherit"
                    }],
                    template: new u({
                        template: r.comboBoxTemplate,
                        title: "Font Name"
                    })
                }));
                f("fontSize", new d({
                    cssAttr: "font-size",
                    domAttr: "fontSize",
                    name: "fontSize",
                    defaultValue: [{
                        text: "fontSizeInherit",
                        value: "inherit"
                    }],
                    template: new u({
                        template: r.comboBoxTemplate,
                        title: "Font Size"
                    })
                }))
            }(window.kendo.jQuery)
        }(),
        function() {
            ! function(n) {
                var u, a = window.kendo,
                    v = a.Class,
                    y = n.extend,
                    r = a.ui.editor,
                    e = a.ui.Editor.fn.options.formats,
                    t = r.Dom,
                    w = r.Command,
                    o = r.ToolTemplate,
                    b = r.FormatTool,
                    i = r.EditorUtils,
                    s = i.registerTool,
                    h = i.registerFormat,
                    p = r.RangeUtils,
                    c = v.extend({
                        init: function(n) {
                            this.format = n
                        },
                        contains: function(n, i) {
                            for (var u, r = 0, f = i.length; f > r; r++)
                                if (u = i[r], !u || !t.isAncestorOrSelf(n, u)) return !1;
                            return !0
                        },
                        findSuitable: function(i) {
                            for (var f, e, s = this.format, u = [], r = 0, o = i.length; o > r; r++) {
                                for (e = s.length - 1; e >= 0 && !(f = t.ofType(i[r], s[e].tags) ? i[r] : t.parentOfType(i[r], s[e].tags)); e--);
                                if (!f || "true" === f.contentEditable) return [];
                                n.inArray(f, u) < 0 && u.push(f)
                            }
                            for (r = 0, o = u.length; o > r; r++)
                                if (this.contains(u[r], u)) return [u[r]];
                            return u
                        },
                        findFormat: function(n) {
                            for (var i, e, o, u = this.format, s = t.editableParent(n), r = 0, f = u.length; f > r; r++)
                                for (i = n, e = u[r].tags, o = u[r].attr; i && t.isAncestorOf(s, i);) {
                                    if (t.ofType(i, e) && t.attrEquals(i, o)) return i;
                                    i = i.parentNode
                                }
                            return null
                        },
                        getFormat: function(n) {
                            var i, u, e = this,
                                f = function(n) {
                                    return e.findFormat(t.isDataNode(n) ? n.parentNode : n)
                                },
                                r = f(n[0]);
                            if (!r) return "";
                            for (i = 1, u = n.length; u > i; i++)
                                if (r != f(n[i])) return "";
                            return r.nodeName.toLowerCase()
                        },
                        isFormatted: function(n) {
                            for (var t = 0, i = n.length; i > t; t++)
                                if (!this.findFormat(n[t])) return !1;
                            return !0
                        }
                    }),
                    l = v.extend({
                        init: function(n, t) {
                            this.format = n;
                            this.values = t;
                            this.finder = new c(n)
                        },
                        wrap: function(n, i, r) {
                            var o, h, u, s, f, e = 1 == r.length ? t.blockParentOrBody(r[0]) : t.commonAncestor.apply(null, r);
                            for (t.isInline(e) && (e = t.blockParentOrBody(e)), o = t.significantChildNodes(e), h = t.findNodeIndex(o[0]), u = t.create(e.ownerDocument, n, i), s = 0; o.length > s; s++) f = o[s], t.isBlock(f) ? (t.attr(f, i), u.childNodes.length && (t.insertBefore(u, f), u = u.cloneNode(!1)), h = t.findNodeIndex(f) + 1) : u.appendChild(f);
                            u.firstChild && t.insertAt(e, u, h)
                        },
                        apply: function(r) {
                            function o(n) {
                                return y({}, n && n.attr, l)
                            }
                            var u, s, f, e, h, l = this.values,
                                c = t.filter("img", r),
                                a = i.formatByName("img", this.format),
                                v = o(a);
                            if (n.each(c, function() {
                                    t.attr(this, v)
                                }), c.length != r.length)
                                if (s = t.filter("img", r, !0), f = this.finder.findSuitable(s), f.length)
                                    for (e = 0, h = f.length; h > e; e++) u = i.formatByName(t.name(f[e]), this.format), t.attr(f[e], o(u));
                                else u = this.format[0], this.wrap(u.tags[0], o(u), s)
                        },
                        remove: function(n) {
                            for (var r, u, e, f = 0, o = n.length; o > f; f++) r = this.finder.findFormat(n[f]), r && (e = t.name(r), "div" != e || r.getAttribute("class") ? (u = i.formatByName(e, this.format), u.attr.style && t.unstyle(r, u.attr.style), u.attr.className && t.removeClass(r, u.attr.className)) : t.unwrap(r))
                        },
                        toggle: function(n) {
                            var t = this,
                                i = p.nodes(n);
                            t.finder.isFormatted(i) ? t.remove(i) : t.apply(i)
                        }
                    }),
                    k = v.extend({
                        init: function(n, t) {
                            var i = this;
                            i.format = n;
                            i.values = t;
                            i.finder = new c(n)
                        },
                        apply: function(n) {
                            var i, h, c, a, e, v, o, f = this.format,
                                u = t.blockParents(n),
                                s = f[0].tags[0];
                            if (u.length)
                                for (i = 0, h = u.length; h > i; i++) o = t.name(u[i]), "li" == o ? (c = u[i].parentNode, a = new r.ListFormatter(c.nodeName.toLowerCase(), s), e = this.editor.createRange(), e.selectNode(u[i]), a.toggle(e)) : s && ("td" == o || u[i].attributes.contentEditable) ? new l(f, this.values).apply(u[i].childNodes) : (v = t.changeTag(u[i], s), t.attr(v, f[0].attr));
                            else new l(f, this.values).apply(n)
                        },
                        toggle: function(n) {
                            var i = p.textNodes(n);
                            i.length || (n.selectNodeContents(n.commonAncestorContainer), i = p.textNodes(n), i.length || (i = t.significantChildNodes(n.commonAncestorContainer)));
                            this.apply(i)
                        }
                    }),
                    d = w.extend({
                        init: function(n) {
                            n.formatter = n.formatter();
                            w.fn.init.call(this, n)
                        }
                    }),
                    f = b.extend({
                        init: function(n) {
                            b.fn.init.call(this, y(n, {
                                finder: new c(n.format),
                                formatter: function() {
                                    return new l(n.format)
                                }
                            }))
                        }
                    });
                y(r, {
                    BlockFormatFinder: c,
                    BlockFormatter: l,
                    GreedyBlockFormatter: k,
                    FormatCommand: d,
                    BlockFormatTool: f
                });
                u = ["ul", "ol", "li"];
                h("justifyLeft", [{
                    tags: t.nonListBlockElements,
                    attr: {
                        style: {
                            textAlign: "left"
                        }
                    }
                }, {
                    tags: ["img"],
                    attr: {
                        style: {
                            float: "left",
                            display: "",
                            marginLeft: "",
                            marginRight: ""
                        }
                    }
                }, {
                    tags: u,
                    attr: {
                        style: {
                            textAlign: "left",
                            listStylePosition: ""
                        }
                    }
                }]);
                s("justifyLeft", new f({
                    format: e.justifyLeft,
                    template: new o({
                        template: i.buttonTemplate,
                        title: "Justify Left"
                    })
                }));
                h("justifyCenter", [{
                    tags: t.nonListBlockElements,
                    attr: {
                        style: {
                            textAlign: "center"
                        }
                    }
                }, {
                    tags: ["img"],
                    attr: {
                        style: {
                            display: "block",
                            marginLeft: "auto",
                            marginRight: "auto",
                            float: ""
                        }
                    }
                }, {
                    tags: u,
                    attr: {
                        style: {
                            textAlign: "center",
                            listStylePosition: "inside"
                        }
                    }
                }]);
                s("justifyCenter", new f({
                    format: e.justifyCenter,
                    template: new o({
                        template: i.buttonTemplate,
                        title: "Justify Center"
                    })
                }));
                h("justifyRight", [{
                    tags: t.nonListBlockElements,
                    attr: {
                        style: {
                            textAlign: "right"
                        }
                    }
                }, {
                    tags: ["img"],
                    attr: {
                        style: {
                            float: "right",
                            display: "",
                            marginLeft: "",
                            marginRight: ""
                        }
                    }
                }, {
                    tags: u,
                    attr: {
                        style: {
                            textAlign: "right",
                            listStylePosition: "inside"
                        }
                    }
                }]);
                s("justifyRight", new f({
                    format: e.justifyRight,
                    template: new o({
                        template: i.buttonTemplate,
                        title: "Justify Right"
                    })
                }));
                h("justifyFull", [{
                    tags: t.nonListBlockElements,
                    attr: {
                        style: {
                            textAlign: "justify"
                        }
                    }
                }, {
                    tags: ["img"],
                    attr: {
                        style: {
                            display: "block",
                            marginLeft: "auto",
                            marginRight: "auto",
                            float: ""
                        }
                    }
                }, {
                    tags: u,
                    attr: {
                        style: {
                            textAlign: "justify",
                            listStylePosition: ""
                        }
                    }
                }]);
                s("justifyFull", new f({
                    format: e.justifyFull,
                    template: new o({
                        template: i.buttonTemplate,
                        title: "Justify Full"
                    })
                }))
            }(window.kendo.jQuery)
        }(),
        function() {
            ! function(n) {
                var e = window.kendo,
                    l = n.extend,
                    i = e.ui.editor,
                    t = i.Dom,
                    u = i.Command,
                    o = i.Tool,
                    a = i.BlockFormatter,
                    f = t.normalize,
                    r = i.RangeUtils,
                    s = i.EditorUtils.registerTool,
                    h = u.extend({
                        init: function(n) {
                            this.options = n;
                            u.fn.init.call(this, n)
                        },
                        _insertMarker: function(n, i) {
                            var u, r = t.create(n, "a");
                            return r.className = "k-marker", i.insertNode(r), r.parentNode || (u = i.commonAncestorContainer, u.innerHTML = "", u.appendChild(r)), f(r.parentNode), r
                        },
                        _moveFocus: function(n, i) {
                            if (t.isEmpty(i)) n.setStartBefore(i);
                            else {
                                n.selectNodeContents(i);
                                var u = r.textNodes(n)[0];
                                if (!u) {
                                    for (; i.childNodes.length && !t.is(i.firstChild, "br");) i = i.firstChild;
                                    u = i
                                }
                                t.isEmpty(u) ? n.setStartBefore(u) : (t.emptyNode(u) && (u.innerHTML = "﻿"), n.setStartBefore(u.firstChild || u))
                            }
                        },
                        shouldTrim: function(n) {
                            var i = "p,h1,h2,h3,h4,h5,h6".split(","),
                                r = t.parentOfType(n.startContainer, i),
                                u = t.parentOfType(n.endContainer, i);
                            return r && !u || !r && u
                        },
                        _blankAfter: function(n) {
                            for (; n && (t.isMarker(n) || "" === t.stripBom(n.nodeValue));) n = n.nextSibling;
                            return !n
                        },
                        exec: function() {
                            var l, o, n, s, h, u, c, v, e = this.getRange(),
                                y = r.documentFromRange(e),
                                p = i.emptyElementContent,
                                w = this.shouldTrim(e);
                            e.deleteContents();
                            h = this._insertMarker(y, e);
                            u = t.closestEditableOfType(h, ["li"]);
                            c = t.closestEditableOfType(h, "h1,h2,h3,h4,h5,h6".split(","));
                            u ? t.emptyNode(u) && (s = t.create(y, "p"), u.nextSibling && (v = e.cloneRange(), v.selectNode(u), r.split(v, u.parentNode)), t.insertAfter(s, u.parentNode), t.remove(1 == u.parentNode.childNodes.length ? u.parentNode : u), s.innerHTML = p, n = s) : c && this._blankAfter(h) && (s = t.create(y, "p"), t.insertAfter(s, c), s.innerHTML = p, t.remove(h), n = s);
                            n || (u || c || new a([{
                                tags: ["p"]
                            }]).apply([h]), e.selectNode(h), l = t.parentOfType(h, [u ? "li" : c ? t.name(c) : "p"]), r.split(e, l, w), o = l.previousSibling, t.is(o, "li") && o.firstChild && !t.is(o.firstChild, "br") && (o = o.firstChild), n = l.nextSibling, this.clean(o), this.clean(n, {
                                links: !0
                            }), t.is(n, "li") && n.firstChild && !t.is(n.firstChild, "br") && (n = n.firstChild), t.remove(l), f(o));
                            f(n);
                            this._moveFocus(e, n);
                            e.collapse(!0);
                            t.scrollTo(n);
                            r.selectRange(e)
                        },
                        clean: function(r, u) {
                            var f, e = r;
                            if (r.firstChild && t.is(r.firstChild, "br") && t.remove(r.firstChild), t.isDataNode(r) && !r.nodeValue && (r = r.parentNode), r) {
                                for (f = !1; r.firstChild && 1 == r.firstChild.nodeType;) f = f || t.significantNodes(r.childNodes).length > 1, r = r.firstChild;
                                if (t.isEmpty(r) || !/^\s*$/.test(r.innerHTML) || f || (n(e).find(".k-br").remove(), r.innerHTML = i.emptyElementContent), u && u.links)
                                    for (; r != e;) {
                                        if (t.is(r, "a") && t.emptyNode(r)) {
                                            t.unwrap(r);
                                            break
                                        }
                                        r = r.parentNode
                                    }
                            }
                        }
                    }),
                    c = u.extend({
                        init: function(n) {
                            this.options = n;
                            u.fn.init.call(this, n)
                        },
                        exec: function() {
                            var u, i = this.getRange(),
                                n = t.create(r.documentFromRange(i), "br"),
                                o = e.support.browser,
                                s = o.msie && 11 > o.version;
                            i.deleteContents();
                            i.insertNode(n);
                            f(n.parentNode);
                            s || n.nextSibling && !t.isWhitespace(n.nextSibling) || (u = n.cloneNode(!0), u.className = "k-br", t.insertAfter(u, n));
                            i.setStartAfter(n);
                            i.collapse(!0);
                            t.scrollTo(n.nextSibling || n);
                            r.selectRange(i)
                        }
                    });
                l(i, {
                    ParagraphCommand: h,
                    NewLineCommand: c
                });
                s("insertLineBreak", new o({
                    key: 13,
                    shift: !0,
                    command: c
                }));
                s("insertParagraph", new o({
                    key: 13,
                    command: h
                }))
            }(window.kendo.jQuery)
        }(),
        function() {
            ! function(n) {
                var s = window.kendo,
                    b = s.Class,
                    u = n.extend,
                    i = s.ui.editor,
                    t = i.Dom,
                    f = i.RangeUtils,
                    h = i.EditorUtils,
                    c = i.Command,
                    l = i.ToolTemplate,
                    a = i.FormatTool,
                    v = i.BlockFormatFinder,
                    e = f.textNodes,
                    y = i.EditorUtils.registerTool,
                    r = v.extend({
                        init: function(n) {
                            this.tag = n;
                            var t = this.tags = ["ul" == n ? "ol" : "ul", n];
                            v.fn.init.call(this, [{
                                tags: t
                            }])
                        },
                        isFormatted: function(n) {
                            for (var r, u = [], i = 0; n.length > i; i++) r = this.findFormat(n[i]), r && t.name(r) == this.tag && u.push(r);
                            if (1 > u.length || u.length != n.length) return !1;
                            for (i = 0; u.length > i && u[i].parentNode == r.parentNode; i++)
                                if (u[i] != r) return !1;
                            return !0
                        },
                        findSuitable: function(n) {
                            var i = this.findFormat(n[0]);
                            return i && t.name(i) == this.tag ? i : null
                        }
                    }),
                    p = b.extend({
                        init: function(n, t) {
                            var i = this;
                            i.finder = new r(n);
                            i.tag = n;
                            i.unwrapTag = t
                        },
                        isList: function(n) {
                            var i = t.name(n);
                            return "ul" == i || "ol" == i || "dl" == i
                        },
                        wrap: function(n, i) {
                            for (var r, u = t.create(n.ownerDocument, "li"), f = 0; i.length > f; f++)
                                if (r = i[f], t.is(r, "li")) n.appendChild(r);
                                else if (this.isList(r))
                                for (; r.firstChild;) n.appendChild(r.firstChild);
                            else if (t.is(r, "td")) {
                                for (; r.firstChild;) u.appendChild(r.firstChild);
                                n.appendChild(u);
                                r.appendChild(n);
                                n = n.cloneNode(!1);
                                u = u.cloneNode(!1)
                            } else u.appendChild(r), t.isBlock(r) && (n.appendChild(u), t.unwrap(r), u = u.cloneNode(!1));
                            u.firstChild && n.appendChild(u)
                        },
                        containsAny: function(n, i) {
                            for (var r = 0; i.length > r; r++)
                                if (t.isAncestorOrSelf(n, i[r])) return !0;
                            return !1
                        },
                        suitable: function(n, i) {
                            if ("k-marker" == n.className) {
                                var r = n.nextSibling;
                                if (r && t.isBlock(r) || (r = n.previousSibling, r && t.isBlock(r))) return !1
                            }
                            return this.containsAny(n, i) || t.isInline(n) || 3 == n.nodeType
                        },
                        _parentLists: function(i) {
                            var r = t.closestEditable(i);
                            return n(i).parentsUntil(r, "ul,ol")
                        },
                        split: function(n) {
                            var s, h, o, r, c, u, i = e(n);
                            if (i.length)
                                for (s = t.parentOfType(i[0], ["li"]), h = t.parentOfType(i[i.length - 1], ["li"]), n.setStartBefore(s), n.setEndAfter(h), r = 0, c = i.length; c > r; r++) u = this.finder.findFormat(i[r]), u && (o = this._parentLists(u), o.length ? f.split(n, o.last()[0], !0) : f.split(n, u, !0))
                        },
                        merge: function(n, i) {
                            for (var r, u = i.previousSibling; u && ("k-marker" == u.className || 3 == u.nodeType && t.isWhitespace(u));) u = u.previousSibling;
                            if (u && t.name(u) == n) {
                                for (; i.firstChild;) u.appendChild(i.firstChild);
                                t.remove(i);
                                i = u
                            }
                            for (r = i.nextSibling; r && ("k-marker" == r.className || 3 == r.nodeType && t.isWhitespace(r));) r = r.nextSibling;
                            if (r && t.name(r) == n) {
                                for (; i.lastChild;) r.insertBefore(i.lastChild, r.firstChild);
                                t.remove(i)
                            }
                        },
                        breakable: function(n) {
                            return n != n.ownerDocument.body && !/table|tbody|tr|td/.test(t.name(n)) && !n.attributes.contentEditable
                        },
                        applyOnSection: function(i, u) {
                            function v() {
                                s.push(this)
                            }
                            var e, l, o, a, h = this.tag,
                                c = t.closestSplittableParent(u),
                                s = [],
                                f = this.finder.findSuitable(u);
                            for (f || (f = new r("ul" == h ? "ol" : "ul").findSuitable(u)), /table|tbody/.test(t.name(c)) ? e = n.map(u, function(n) {
                                    return t.parentOfType(n, ["td"])
                                }) : (e = t.significantChildNodes(c), n.grep(e, t.isBlock).length && (e = n.grep(e, n.proxy(function(n) {
                                    return this.containsAny(n, u)
                                }, this))), e.length || (e = u)), l = 0; e.length > l; l++) o = e[l], a = (!f || !t.isAncestorOrSelf(f, o)) && this.suitable(o, u), a && (f && this.isList(o) ? (n.each(o.childNodes, v), t.remove(o)) : s.push(o));
                            s.length == e.length && this.breakable(c) && (s = [c]);
                            f || (f = t.create(c.ownerDocument, h), t.insertBefore(f, s[0]));
                            this.wrap(f, s);
                            t.is(f, h) || t.changeTag(f, h);
                            this.merge(h, f)
                        },
                        apply: function(n) {
                            var r, f, e, i = 0,
                                u = [];
                            do e = t.closestEditable(n[i], ["td", "body"]), r && e == r ? f.push(n[i]) : (r && u.push({
                                section: r,
                                nodes: f
                            }), f = [n[i]], r = e), i++; while (n.length > i);
                            for (u.push({
                                    section: r,
                                    nodes: f
                                }), i = 0; u.length > i; i++) this.applyOnSection(u[i].section, u[i].nodes)
                        },
                        unwrap: function(n) {
                            for (var f, i, e, u = n.ownerDocument.createDocumentFragment(), o = this.unwrapTag, r = n.firstChild; r; r = r.nextSibling) {
                                for (i = t.create(n.ownerDocument, o || "p"); r.firstChild;) e = r.firstChild, t.isBlock(e) ? (i.firstChild && (u.appendChild(i), i = t.create(n.ownerDocument, o || "p")), u.appendChild(e)) : i.appendChild(e);
                                i.firstChild && u.appendChild(i)
                            }
                            f = this._parentLists(n);
                            f[0] ? (t.insertAfter(u, f.last()[0]), f.last().remove()) : t.insertAfter(u, n);
                            t.remove(n)
                        },
                        remove: function(n) {
                            for (var i, t = 0, r = n.length; r > t; t++) i = this.finder.findFormat(n[t]), i && this.unwrap(i)
                        },
                        toggle: function(n) {
                            var i, r = this,
                                t = e(n),
                                u = n.commonAncestorContainer;
                            t.length || (n.selectNodeContents(u), t = e(n), t.length || (i = u.ownerDocument.createTextNode(""), n.startContainer.appendChild(i), t = [i], n.selectNode(i.parentNode)));
                            r.finder.isFormatted(t) ? (r.split(n), r.remove(t)) : r.apply(t)
                        }
                    }),
                    w = c.extend({
                        init: function(n) {
                            n.formatter = new p(n.tag);
                            c.fn.init.call(this, n)
                        }
                    }),
                    o = a.extend({
                        init: function(n) {
                            this.options = n;
                            a.fn.init.call(this, u(n, {
                                finder: new r(n.tag)
                            }))
                        },
                        command: function(n) {
                            return new w(u(n, {
                                tag: this.options.tag
                            }))
                        }
                    });
                u(i, {
                    ListFormatFinder: r,
                    ListFormatter: p,
                    ListCommand: w,
                    ListTool: o
                });
                y("insertUnorderedList", new o({
                    tag: "ul",
                    template: new l({
                        template: h.buttonTemplate,
                        title: "Insert unordered list"
                    })
                }));
                y("insertOrderedList", new o({
                    tag: "ol",
                    template: new l({
                        template: h.buttonTemplate,
                        title: "Insert ordered list"
                    })
                }))
            }(window.kendo.jQuery)
        }(),
        function() {
            ! function(n) {
                var r = window.kendo,
                    h = r.Class,
                    d = n.extend,
                    u = n.proxy,
                    i = r.ui.editor,
                    t = i.Dom,
                    f = i.RangeUtils,
                    c = i.EditorUtils,
                    e = i.Command,
                    o = i.Tool,
                    l = i.ToolTemplate,
                    a = i.InlineFormatter,
                    g = i.InlineFormatFinder,
                    s = f.textNodes,
                    v = i.EditorUtils.registerTool,
                    y = h.extend({
                        findSuitable: function(n) {
                            return t.parentOfType(n, ["a"])
                        }
                    }),
                    p = h.extend({
                        init: function() {
                            this.finder = new y
                        },
                        apply: function(n, i) {
                            var r, h, c, u, e, l, o, v = s(n);
                            if (i.innerHTML) {
                                for (h = f.documentFromRange(n), r = f.getMarkers(n), n.deleteContents(), u = t.create(h, "a", i), n.insertNode(u), e = u.parentNode, "a" == t.name(e) && t.insertAfter(u, e), t.emptyNode(e) && t.remove(e), l = u, o = 0; r.length > o; o++) t.insertAfter(r[o], l), l = r[o];
                                r.length && (t.insertBefore(h.createTextNode("﻿"), r[1]), t.insertAfter(h.createTextNode("﻿"), r[1]), n.setStartBefore(r[0]), n.setEndAfter(r[r.length - 1]))
                            } else c = new a([{
                                tags: ["a"]
                            }], i), c.finder = this.finder, c.apply(v)
                        }
                    }),
                    w = e.extend({
                        init: function(n) {
                            n.formatter = {
                                toggle: function(n) {
                                    new a([{
                                        tags: ["a"]
                                    }]).remove(s(n))
                                }
                            };
                            this.options = n;
                            e.fn.init.call(this, n)
                        }
                    }),
                    b = e.extend({
                        init: function(n) {
                            this.options = n;
                            e.fn.init.call(this, n);
                            this.formatter = new p;
                            n.url ? this.exec = function() {
                                this.formatter.apply(n.range, {
                                    href: n.url,
                                    innerHTML: n.text || n.url,
                                    target: n.target
                                })
                            } : (this.attributes = null, this.async = !0)
                        },
                        _dialogTemplate: function() {
                            return r.template("<div class=\"k-editor-dialog k-popup-edit-form k-edit-form-container\"><div class='k-edit-label'><label for='k-editor-link-url'>#: messages.linkWebAddress #<\/label><\/div><div class='k-edit-field'><input type='text' class='k-input k-textbox' id='k-editor-link-url'><\/div><div class='k-edit-label k-editor-link-text-row'><label for='k-editor-link-text'>#: messages.linkText #<\/label><\/div><div class='k-edit-field k-editor-link-text-row'><input type='text' class='k-input k-textbox' id='k-editor-link-text'><\/div><div class='k-edit-label'><label for='k-editor-link-title'>#: messages.linkToolTip #<\/label><\/div><div class='k-edit-field'><input type='text' class='k-input k-textbox' id='k-editor-link-title'><\/div><div class='k-edit-label'><\/div><div class='k-edit-field'><input type='checkbox' class='k-checkbox' id='k-editor-link-target'><label for='k-editor-link-target' class='k-checkbox-label'>#: messages.linkOpenInNewWindow #<\/label><\/div><div class='k-edit-buttons k-state-default'><button class=\"k-dialog-insert k-button k-primary\">#: messages.dialogInsert #<\/button><button class=\"k-dialog-close k-button\">#: messages.dialogCancel #<\/button><\/div><\/div>")({
                                messages: this.editor.options.messages
                            })
                        },
                        exec: function() {
                            var r, i, e, f, o = this.editor.options.messages;
                            this._initialText = "";
                            this._range = this.lockRange(!0);
                            r = s(this._range);
                            i = r.length ? this.formatter.finder.findSuitable(r[0]) : null;
                            e = r.length && "img" == t.name(r[0]);
                            f = this.createDialog(this._dialogTemplate(), {
                                title: o.createLink,
                                close: u(this._close, this),
                                visible: !1
                            });
                            i && (this._range.selectNodeContents(i), r = s(this._range));
                            this._initialText = this.linkText(r);
                            f.find(".k-dialog-insert").click(u(this._apply, this)).end().find(".k-dialog-close").click(u(this._close, this)).end().find(".k-edit-field input").keydown(u(this._keydown, this)).end().find("#k-editor-link-url").val(this.linkUrl(i)).end().find("#k-editor-link-text").val(this._initialText).end().find("#k-editor-link-title").val(i ? i.title : "").end().find("#k-editor-link-target").attr("checked", i ? "_blank" == i.target : !1).end().find(".k-editor-link-text-row").toggle(!e);
                            this._dialog = f.data("kendoWindow").center().open();
                            n("#k-editor-link-url", f).focus().select()
                        },
                        _keydown: function(n) {
                            var t = r.keys;
                            n.keyCode == t.ENTER ? this._apply(n) : n.keyCode == t.ESC && this._close(n)
                        },
                        _apply: function(i) {
                            var e, u, o, f = this._dialog.element,
                                r = n("#k-editor-link-url", f).val(),
                                s = n("#k-editor-link-text", f);
                            r && "http://" != r && (r.indexOf("@") > 0 && !/^(\w+:)|(\/\/)/i.test(r) && (r = "mailto:" + r), this.attributes = {
                                href: r
                            }, e = n("#k-editor-link-title", f).val(), e && (this.attributes.title = e), s.is(":visible") && (u = s.val(), u || this._initialText ? u && u !== this._initialText && (this.attributes.innerHTML = t.stripBom(u)) : this.attributes.innerHTML = r), o = n("#k-editor-link-target", f).is(":checked"), this.attributes.target = o ? "_blank" : null, this.formatter.apply(this._range, this.attributes));
                            this._close(i);
                            this.change && this.change()
                        },
                        _close: function(n) {
                            n.preventDefault();
                            this._dialog.destroy();
                            t.windowFromDocument(f.documentFromRange(this._range)).focus();
                            this.releaseRange(this._range)
                        },
                        linkUrl: function(n) {
                            return n ? n.getAttribute("href", 2) : "http://"
                        },
                        linkText: function(n) {
                            for (var r = "", i = 0; n.length > i; i++) r += n[i].nodeValue;
                            return t.stripBom(r || "")
                        },
                        redo: function() {
                            var n = this.lockRange(!0);
                            this.formatter.apply(n, this.attributes);
                            this.releaseRange(n)
                        }
                    }),
                    k = o.extend({
                        init: function(t) {
                            this.options = t;
                            this.finder = new g([{
                                tags: ["a"]
                            }]);
                            o.fn.init.call(this, n.extend(t, {
                                command: w
                            }))
                        },
                        initialize: function(n, t) {
                            o.fn.initialize.call(this, n, t);
                            n.addClass("k-state-disabled")
                        },
                        update: function(n, t) {
                            n.toggleClass("k-state-disabled", !this.finder.isFormatted(t)).removeClass("k-state-hover")
                        }
                    });
                d(r.ui.editor, {
                    LinkFormatFinder: y,
                    LinkFormatter: p,
                    UnlinkCommand: w,
                    LinkCommand: b,
                    UnlinkTool: k
                });
                v("createLink", new o({
                    key: "K",
                    ctrl: !0,
                    command: b,
                    template: new l({
                        template: c.buttonTemplate,
                        title: "Create Link"
                    })
                }));
                v("unlink", new k({
                    key: "K",
                    ctrl: !0,
                    shift: !0,
                    template: new l({
                        template: c.buttonTemplate,
                        title: "Remove Link"
                    })
                }))
            }(window.kendo.jQuery)
        }(),
        function() {
            ! function(n, t) {
                var r = window.kendo,
                    a = n.extend,
                    i = r.ui.editor,
                    o = i.EditorUtils,
                    u = i.Dom,
                    v = o.registerTool,
                    y = i.ToolTemplate,
                    f = i.RangeUtils,
                    s = i.Command,
                    p = i.LinkFormatter,
                    w = f.textNodes,
                    h = r.keys,
                    e = "#k-editor-file-url",
                    c = "#k-editor-file-title",
                    l = s.extend({
                        init: function(n) {
                            var t = this;
                            s.fn.init.call(t, n);
                            t.formatter = new p;
                            t.async = !0;
                            t.attributes = {}
                        },
                        insertFile: function(n, t) {
                            var i = this.attributes,
                                r = f.documentFromRange(t);
                            if (i.href && "http://" != i.href) {
                                if (!n) return n = u.create(r, "a", {
                                    href: i.href
                                }), n.innerHTML = i.innerHTML, t.deleteContents(), t.insertNode(n), n.nextSibling || u.insertAfter(r.createTextNode("﻿"), n), t.setStartAfter(n), t.setEndAfter(n), f.selectRange(t), !0;
                                u.attr(n, i)
                            }
                            return !1
                        },
                        _dialogTemplate: function(n) {
                            return r.template('<div class="k-editor-dialog k-popup-edit-form k-edit-form-container"># if (showBrowser) { #<div class="k-filebrowser"><\/div># } #<div class=\'k-edit-label\'><label for="k-editor-file-url">#: messages.fileWebAddress #<\/label><\/div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-file-url"><\/div><div class=\'k-edit-label\'><label for="k-editor-file-title">#: messages.fileTitle #<\/label><\/div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-file-title"><\/div><div class="k-edit-buttons k-state-default"><button class="k-dialog-insert k-button k-primary">#: messages.dialogInsert #<\/button><button class="k-dialog-close k-button">#: messages.dialogCancel #<\/button><\/div><\/div>')({
                                messages: this.editor.options.messages,
                                showBrowser: n
                            })
                        },
                        redo: function() {
                            var n = this,
                                t = n.lockRange();
                            this.formatter.apply(t, this.attributes);
                            n.releaseRange(t)
                        },
                        exec: function() {
                            function p(t) {
                                var r = i.element,
                                    u = r.find(e).val().replace(/ /g, "%20"),
                                    f = r.find(c).val();
                                n.attributes = {
                                    href: u,
                                    innerHTML: "" !== f ? f : u
                                };
                                d = n.insertFile(o, v);
                                l(t);
                                n.change && n.change()
                            }

                            function l(t) {
                                t.preventDefault();
                                i.destroy();
                                u.windowFromDocument(f.documentFromRange(v)).focus();
                                d || n.releaseRange(v)
                            }

                            function nt(n) {
                                n.keyCode == h.ENTER ? p(n) : n.keyCode == h.ESC && l(n)
                            }
                            var i, n = this,
                                v = n.lockRange(),
                                k = w(v),
                                d = !1,
                                o = k.length ? this.formatter.finder.findSuitable(k[0]) : null,
                                g = n.editor.options,
                                tt = g.messages,
                                y = g.fileBrowser,
                                s = !!(r.ui.FileBrowser && y && y.transport && y.transport.read !== t),
                                b = {
                                    title: tt.insertFile,
                                    visible: !1,
                                    resizable: s
                                };
                            b.close = l;
                            s && (b.width = 750);
                            i = this.createDialog(n._dialogTemplate(s), b).toggleClass("k-filebrowser-dialog", s).find(".k-dialog-insert").click(p).end().find(".k-dialog-close").click(l).end().find(".k-edit-field input").keydown(nt).end().find(e).val(o ? o.getAttribute("href", 2) : "http://").end().find(c).val(o ? o.title : "").end().data("kendoWindow");
                            s && (n._fileBrowser = new r.ui.FileBrowser(i.element.find(".k-filebrowser"), a({}, y, {
                                change: function() {
                                    i.element.find(e).val(this.value())
                                },
                                apply: p
                            })));
                            i.center().open();
                            i.element.find(e).focus().select()
                        }
                    });
                r.ui.editor.FileCommand = l;
                v("insertFile", new i.Tool({
                    command: l,
                    template: new y({
                        template: o.buttonTemplate,
                        title: "Insert File"
                    })
                }))
            }(window.kendo.jQuery)
        }(),
        function() {
            ! function(n, t) {
                var i = window.kendo,
                    y = n.extend,
                    r = i.ui.editor,
                    o = r.EditorUtils,
                    f = r.Dom,
                    p = o.registerTool,
                    w = r.ToolTemplate,
                    u = r.RangeUtils,
                    s = r.Command,
                    h = i.keys,
                    e = "#k-editor-image-url",
                    c = "#k-editor-image-title",
                    l = "#k-editor-image-width",
                    a = "#k-editor-image-height",
                    v = s.extend({
                        init: function(n) {
                            var t = this;
                            s.fn.init.call(t, n);
                            t.async = !0;
                            t.attributes = {}
                        },
                        insertImage: function(n, t) {
                            var r, i = this.attributes,
                                e = u.documentFromRange(t);
                            if (i.src && "http://" != i.src) {
                                if (r = function() {
                                        setTimeout(function() {
                                            i.width || n.removeAttribute("width");
                                            i.height || n.removeAttribute("height");
                                            n.removeAttribute("complete")
                                        })
                                    }, !n) return n = f.create(e, "img", i), n.onload = n.onerror = r, t.deleteContents(), t.insertNode(n), n.nextSibling || f.insertAfter(e.createTextNode("﻿"), n), r(), t.setStartAfter(n), t.setEndAfter(n), u.selectRange(t), !0;
                                n.onload = n.onerror = r;
                                f.attr(n, i);
                                r()
                            }
                            return !1
                        },
                        _dialogTemplate: function(n) {
                            return i.template('<div class="k-editor-dialog k-popup-edit-form k-edit-form-container"># if (showBrowser) { #<div class="k-filebrowser k-imagebrowser"><\/div># } #<div class=\'k-edit-label\'><label for="k-editor-image-url">#: messages.imageWebAddress #<\/label><\/div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-image-url"><\/div><div class=\'k-edit-label\'><label for="k-editor-image-title">#: messages.imageAltText #<\/label><\/div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-image-title"><\/div><div class=\'k-edit-label\'><label for="k-editor-image-width">#: messages.imageWidth #<\/label><\/div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-image-width"><\/div><div class=\'k-edit-label\'><label for="k-editor-image-height">#: messages.imageHeight #<\/label><\/div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-image-height"><\/div><div class="k-edit-buttons k-state-default"><button class="k-dialog-insert k-button k-primary">#: messages.dialogInsert #<\/button><button class="k-dialog-close k-button">#: messages.dialogCancel #<\/button><\/div><\/div>')({
                                messages: this.editor.options.messages,
                                showBrowser: n
                            })
                        },
                        redo: function() {
                            var n = this,
                                t = n.lockRange();
                            n.insertImage(u.image(t), t) || n.releaseRange(t)
                        },
                        exec: function() {
                            function b(t) {
                                var i = o.element,
                                    u = parseInt(i.find(l).val(), 10),
                                    f = parseInt(i.find(a).val(), 10);
                                n.attributes = {
                                    src: i.find(e).val().replace(/ /g, "%20"),
                                    alt: i.find(c).val()
                                };
                                n.attributes.width = null;
                                n.attributes.height = null;
                                !isNaN(u) && u > 0 && (n.attributes.width = u);
                                !isNaN(f) && f > 0 && (n.attributes.height = f);
                                d = n.insertImage(r, p);
                                v(t);
                                n.change && n.change()
                            }

                            function v(t) {
                                t.preventDefault();
                                o.destroy();
                                f.windowFromDocument(u.documentFromRange(p)).focus();
                                d || n.releaseRange(p)
                            }

                            function nt(n) {
                                n.keyCode == h.ENTER ? b(n) : n.keyCode == h.ESC && v(n)
                            }
                            var o, n = this,
                                p = n.lockRange(),
                                d = !1,
                                r = u.image(p),
                                tt = r && r.getAttribute("width") || "",
                                it = r && r.getAttribute("height") || "",
                                g = n.editor.options,
                                rt = g.messages,
                                w = g.imageBrowser,
                                s = !!(i.ui.ImageBrowser && w && w.transport && w.transport.read !== t),
                                k = {
                                    title: rt.insertImage,
                                    visible: !1,
                                    resizable: s
                                };
                            k.close = v;
                            s && (k.width = 750);
                            o = this.createDialog(n._dialogTemplate(s), k).toggleClass("k-filebrowser-dialog", s).find(".k-dialog-insert").click(b).end().find(".k-dialog-close").click(v).end().find(".k-edit-field input").keydown(nt).end().find(e).val(r ? r.getAttribute("src", 2) : "http://").end().find(c).val(r ? r.alt : "").end().find(l).val(tt).end().find(a).val(it).end().data("kendoWindow");
                            s && (this._imageBrowser = new i.ui.ImageBrowser(o.element.find(".k-imagebrowser"), y({}, w, {
                                change: function() {
                                    o.element.find(e).val(this.value())
                                },
                                apply: b
                            })));
                            o.center().open();
                            o.element.find(e).focus().select()
                        }
                    });
                i.ui.editor.ImageCommand = v;
                p("insertImage", new r.Tool({
                    command: v,
                    template: new w({
                        template: o.buttonTemplate,
                        title: "Insert Image"
                    })
                }))
            }(window.kendo.jQuery)
        }(),
        function() {
            ! function(n, t) {
                var i = window.kendo,
                    r = i.ui.DropDownList,
                    u = i.ui.editor.Dom,
                    f = r.extend({
                        init: function(t, u) {
                            var f = this;
                            r.fn.init.call(f, t, u);
                            i.support.mobileOS.ios && (this._initSelectOverlay(), this.bind("dataBound", n.proxy(this._initSelectOverlay, this)));
                            f.text(f.options.title);
                            f.bind("open", function() {
                                if (f.options.autoSize) {
                                    var n, t = f.list;
                                    t.css({
                                        whiteSpace: "nowrap",
                                        width: "auto"
                                    });
                                    n = t.width();
                                    n ? n += 20 : n = f._listWidth;
                                    t.css("width", n + i.support.scrollbar());
                                    f._listWidth = n
                                }
                            })
                        },
                        options: {
                            name: "SelectBox",
                            index: -1
                        },
                        _initSelectOverlay: function() {
                            for (var t, f, e, o = this, c = o.value(), s = this.dataSource.view(), u = "", h = i.htmlEncode, r = 0; s.length > r; r++) t = s[r], u += "<option value='" + h(t.value) + "'", t.value == c && (u += " selected"), u += ">" + h(t.text) + "<\/option>";
                            f = n("<select class='k-select-overlay'>" + u + "<\/select>");
                            e = n(this.element).closest(".k-widget");
                            e.next(".k-select-overlay").remove();
                            f.insertAfter(e);
                            f.on("change", function() {
                                o.value(this.value);
                                o.trigger("change")
                            })
                        },
                        value: function(n) {
                            var i = this,
                                u = r.fn.value.call(i, n);
                            return n === t ? u : (r.fn.value.call(i) || i.text(i.options.title), t)
                        },
                        decorate: function(t) {
                            var i, e, o, r, s = this,
                                h = s.dataSource,
                                f = h.data();
                            for (t && s.list.css("background-color", u.getEffectiveBackground(n(t))), i = 0; f.length > i; i++) e = f[i].tag || "span", o = f[i].className, r = u.inlineStyle(t, e, {
                                className: o
                            }), r = r.replace(/"/g, "'"), f[i].style = r + ";display:inline-block";
                            h.trigger("change")
                        }
                    });
                i.ui.plugin(f);
                i.ui.editor.SelectBox = f
            }(window.kendo.jQuery)
        }(),
        function() {
            ! function(n, t) {
                function u(r, u) {
                    var o = "rtl" == n(r).css("direction"),
                        e = o ? "Right" : "Left",
                        f = "td" != i.name(r) ? "margin" + e : "padding" + e;
                    return u === t ? r.style[f] || 0 : (u > 0 ? r.style[f] = u + "px" : (r.style[f] = "", r.style.cssText || r.removeAttribute("style")), t)
                }
                var h = window.kendo,
                    b = h.Class,
                    k = n.extend,
                    r = h.ui.editor,
                    i = r.Dom,
                    o = r.EditorUtils,
                    c = o.registerTool,
                    f = r.Command,
                    e = r.Tool,
                    l = r.ToolTemplate,
                    a = r.RangeUtils,
                    d = i.blockElements,
                    v = r.BlockFormatFinder,
                    g = r.BlockFormatter,
                    s = b.extend({
                        init: function() {
                            this.finder = new v([{
                                tags: i.blockElements
                            }])
                        },
                        apply: function(t) {
                            var o, v, r, a, h, l, f, y, c, p, s = this.finder.findSuitable(t),
                                e = [];
                            if (s.length) {
                                for (o = 0, v = s.length; v > o; o++) i.is(s[o], "li") ? n(s[o]).index() ? n.inArray(s[o].parentNode, e) < 0 && e.push(s[o]) : e.push(s[o].parentNode) : e.push(s[o]);
                                for (; e.length;)
                                    if (r = e.shift(), i.is(r, "li"))
                                        if (a = r.parentNode, h = n(r).prev("li"), l = h.find("ul,ol").last(), f = n(r).children("ul,ol")[0], f && h[0]) l[0] ? (l.append(r), l.append(n(f).children()), i.remove(f)) : (h.append(f), f.insertBefore(r, f.firstChild));
                                        else
                                            for (f = h.children("ul,ol")[0], f || (f = i.create(r.ownerDocument, i.name(a)), h.append(f)); r && r.parentNode == a;) f.appendChild(r), r = e.shift();
                                else
                                    for (y = parseInt(u(r), 10) + 30, u(r, y), c = 0; e.length > c; c++) n.contains(r, e[c]) && e.splice(c, 1)
                            } else p = new g([{
                                tags: ["p"]
                            }], {
                                style: {
                                    marginLeft: 30
                                }
                            }), p.apply(t)
                        },
                        remove: function(t) {
                            for (var r, i, e, s, f, l, h = this.finder.findSuitable(t), o = 0, c = h.length; c > o; o++) {
                                if (f = n(h[o]), f.is("li")) {
                                    if (i = f.parent(), e = i.parent(), e.is("li,ul,ol") && !u(i[0])) {
                                        if (r && n.contains(r, e[0])) continue;
                                        s = f.nextAll("li");
                                        s.length && n(i[0].cloneNode(!1)).appendTo(f).append(s);
                                        e.is("li") ? f.insertAfter(e) : f.appendTo(e);
                                        i.children("li").length || i.remove();
                                        continue
                                    }
                                    if (r == i[0]) continue;
                                    r = i[0]
                                } else r = h[o];
                                l = parseInt(u(r), 10) - 30;
                                u(r, l)
                            }
                        }
                    }),
                    y = f.extend({
                        init: function(n) {
                            n.formatter = {
                                toggle: function(n) {
                                    (new s).apply(a.nodes(n))
                                }
                            };
                            f.fn.init.call(this, n)
                        }
                    }),
                    p = f.extend({
                        init: function(n) {
                            n.formatter = {
                                toggle: function(n) {
                                    (new s).remove(a.nodes(n))
                                }
                            };
                            f.fn.init.call(this, n)
                        }
                    }),
                    w = e.extend({
                        init: function(n) {
                            e.fn.init.call(this, n);
                            this.finder = new v([{
                                tags: d
                            }])
                        },
                        initialize: function(n, t) {
                            e.fn.initialize.call(this, n, t);
                            n.addClass("k-state-disabled")
                        },
                        update: function(r, f) {
                            for (var s, h, o = this.finder.findSuitable(f), e = 0, c = o.length; c > e; e++)
                                if (s = u(o[e]), s || (h = n(o[e]).parents("ul,ol").length, s = i.is(o[e], "li") && (h > 1 || u(o[e].parentNode)) || i.ofType(o[e], ["ul", "ol"]) && h > 0), s) return r.removeClass("k-state-disabled"), t;
                            r.addClass("k-state-disabled").removeClass("k-state-hover")
                        }
                    });
                k(r, {
                    IndentFormatter: s,
                    IndentCommand: y,
                    OutdentCommand: p,
                    OutdentTool: w
                });
                c("indent", new e({
                    command: y,
                    template: new l({
                        template: o.buttonTemplate,
                        title: "Indent"
                    })
                }));
                c("outdent", new w({
                    command: p,
                    template: new l({
                        template: o.buttonTemplate,
                        title: "Outdent"
                    })
                }))
            }(window.kendo.jQuery)
        }(),
        function() {
            ! function(n) {
                var r = window.kendo,
                    f = n.extend,
                    t = r.ui.editor,
                    e = t.EditorUtils,
                    u = t.Command,
                    o = t.Tool,
                    s = t.ToolTemplate,
                    i = u.extend({
                        init: function(n) {
                            var t = this;
                            t.options = n;
                            u.fn.init.call(t, n);
                            t.attributes = null;
                            t.async = !0
                        },
                        exec: function() {
                            function h(n) {
                                t.value(u.find(o).val());
                                f(n);
                                e.change && e.change();
                                t.trigger("change")
                            }

                            function f(n) {
                                n.preventDefault();
                                u.data("kendoWindow").destroy();
                                t.focus()
                            }
                            var e = this,
                                t = e.editor,
                                s = t.options.messages,
                                u = n(r.template(i.template)(s)).appendTo(document.body),
                                c = i.indent(t.value()),
                                o = ".k-editor-textarea";
                            this.createDialog(u, {
                                title: s.viewHtml,
                                close: f,
                                visible: !1
                            }).find(o).val(c).end().find(".k-dialog-update").click(h).end().find(".k-dialog-close").click(f).end().data("kendoWindow").center().open();
                            u.find(o).focus()
                        }
                    });
                f(i, {
                    template: "<div class='k-editor-dialog k-popup-edit-form k-edit-form-container k-viewhtml-dialog'><textarea class='k-editor-textarea k-input'><\/textarea><div class='k-edit-buttons k-state-default'><button class='k-dialog-update k-button k-primary'>#: dialogUpdate #<\/button><button class='k-dialog-close k-button'>#: dialogCancel #<\/button><\/div><\/div>",
                    indent: function(n) {
                        return n.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi, "<\/$1>\n").replace(/<(ul|ol)([^>]*)><li/gi, "<$1$2>\n<li").replace(/<br \/>/gi, "<br />\n").replace(/\n$/, "")
                    }
                });
                r.ui.editor.ViewHtmlCommand = i;
                t.EditorUtils.registerTool("viewHtml", new o({
                    command: i,
                    template: new s({
                        template: e.buttonTemplate,
                        title: "View HTML"
                    })
                }))
            }(window.kendo.jQuery)
        }(),
        function() {
            ! function(n) {
                var r = window.kendo,
                    t = r.ui.editor,
                    u = t.Tool,
                    e = t.ToolTemplate,
                    o = t.DelayedExecutionTool,
                    l = t.Command,
                    i = t.Dom,
                    f = t.EditorUtils,
                    a = t.RangeUtils,
                    s = f.registerTool,
                    h = o.extend({
                        init: function(n) {
                            var t = this;
                            u.fn.init.call(t, r.deepExtend({}, t.options, n));
                            t.type = "kendoSelectBox";
                            t.finder = {
                                getFormat: function() {
                                    return ""
                                }
                            }
                        },
                        options: {
                            items: [{
                                text: "Paragraph",
                                value: "p"
                            }, {
                                text: "Quotation",
                                value: "blockquote"
                            }, {
                                text: "Heading 1",
                                value: "h1"
                            }, {
                                text: "Heading 2",
                                value: "h2"
                            }, {
                                text: "Heading 3",
                                value: "h3"
                            }, {
                                text: "Heading 4",
                                value: "h4"
                            }, {
                                text: "Heading 5",
                                value: "h5"
                            }, {
                                text: "Heading 6",
                                value: "h6"
                            }],
                            width: 110
                        },
                        toFormattingItem: function(n) {
                            var i, t = n.value;
                            return t ? n.tag || n.className ? n : (i = t.indexOf("."), 0 === i ? n.className = t.substring(1) : -1 == i ? n.tag = t : (n.tag = t.substring(0, i), n.className = t.substring(i + 1)), n) : n
                        },
                        command: function(r) {
                            var u = r.value;
                            return u = this.toFormattingItem(u), new t.FormatCommand({
                                range: r.range,
                                formatter: function() {
                                    var r = (u.tag || u.context || "span").split(","),
                                        f = [{
                                            tags: r,
                                            attr: {
                                                className: u.className || ""
                                            }
                                        }];
                                    return n.inArray(r[0], i.inlineElements) >= 0 ? new t.GreedyInlineFormatter(f) : new t.GreedyBlockFormatter(f)
                                }
                            })
                        },
                        initialize: function(n, t) {
                            var f = t.editor,
                                e = this.options,
                                i = e.name,
                                o = this;
                            n.width(e.width);
                            n.kendoSelectBox({
                                dataTextField: "text",
                                dataValueField: "value",
                                dataSource: e.items || f.options[i],
                                title: f.options.messages[i],
                                autoSize: !0,
                                change: function() {
                                    var n = this.dataItem();
                                    n && u.exec(f, i, n.toJSON())
                                },
                                dataBound: function() {
                                    for (var t = this.dataSource.data(), n = 0; t.length > n; n++) t[n] = o.toFormattingItem(t[n])
                                },
                                highlightFirst: !1,
                                template: r.template('<span unselectable="on" style="display:block;#=(data.style||"")#">#:data.text#<\/span>')
                            });
                            n.addClass("k-decorated").closest(".k-widget").removeClass("k-" + i).find("*").addBack().attr("unselectable", "on")
                        },
                        getFormattingValue: function(t, i) {
                            for (var r, o, s, e, h, u, f = 0; t.length > f; f++)
                                if (r = t[f], o = r.tag || r.context || "", s = r.className ? "." + r.className : "", e = o + s, h = n(i[0]).closest(e)[0]) {
                                    if (1 == i.length) return r.value;
                                    for (u = 1; i.length > u && n(i[u]).closest(e)[0]; u++)
                                        if (u == i.length - 1) return r.value
                                }
                            return ""
                        },
                        update: function(t, r) {
                            var f, s, e, c, u, h = n(t).data(this.type);
                            if (h && (f = h.dataSource, s = f.data(), u = i.commonAncestor.apply(null, r), u == i.closestEditable(u) || this._ancestor != u)) {
                                for (this._ancestor = u, e = 0; s.length > e; e++) c = s[e].context, s[e].visible = !c || !!n(u).closest(c).length;
                                f.filter([{
                                    field: "visible",
                                    operator: "eq",
                                    value: !0
                                }]);
                                o.fn.update.call(this, t, r);
                                h.value(this.getFormattingValue(f.view(), r));
                                h.wrapper.toggleClass("k-state-disabled", !f.view().length)
                            }
                        },
                        destroy: function() {
                            this._ancestor = null
                        }
                    }),
                    c = l.extend({
                        exec: function() {
                            var u, e = new t.ListFormatter("ul"),
                                r = this.lockRange(!0),
                                o = this.options.remove || "strong,em,span,sup,sub,del,b,i,u,font".split(",");
                            a.wrapSelectedElements(r);
                            u = new t.RangeIterator(r);
                            u.traverse(function f(t) {
                                var u, r, h, s;
                                if (t && !i.isMarker(t)) {
                                    if (u = i.name(t), "ul" == u || "ol" == u)
                                        for (r = t.previousSibling, h = t.nextSibling, e.unwrap(t); r && r != h; r = r.nextSibling) f(r);
                                    else if ("blockquote" == u) i.changeTag(t, "p");
                                    else if (1 == t.nodeType && !i.insignificant(t)) {
                                        for (s = t.childNodes.length - 1; s >= 0; s--) f(t.childNodes[s]);
                                        t.removeAttribute("style");
                                        t.removeAttribute("class")
                                    }
                                    n.inArray(u, o) > -1 && i.unwrap(t)
                                }
                            });
                            this.releaseRange(r)
                        }
                    });
                n.extend(t, {
                    FormattingTool: h,
                    CleanFormatCommand: c
                });
                s("formatting", new h({
                    template: new e({
                        template: f.dropDownListTemplate,
                        title: "Format"
                    })
                }));
                s("cleanFormatting", new u({
                    command: c,
                    template: new e({
                        template: f.buttonTemplate,
                        title: "Clean formatting"
                    })
                }))
            }(window.kendo.jQuery)
        }(),
        function() {
            ! function(n) {
                var h, t = window.kendo,
                    c = t.ui,
                    l = c.editor,
                    s = c.Widget,
                    f = n.extend,
                    e = n.proxy,
                    i = t.keys,
                    r = ".kendoEditor",
                    a = t.ui.editor.EditorUtils,
                    v = t.ui.editor.ToolTemplate,
                    y = t.ui.editor.Tool,
                    u = "overflowAnchor",
                    o = ".k-tool-group:visible a.k-tool:not(.k-state-disabled),.k-tool.k-overflow-anchor,.k-tool-group:visible .k-widget.k-colorpicker,.k-tool-group:visible .k-selectbox,.k-tool-group:visible .k-dropdown,.k-tool-group:visible .k-combobox .k-input",
                    p = y.extend({
                        initialize: function(t, i) {
                            t.attr({
                                unselectable: "on"
                            });
                            var r = i.editor.toolbar;
                            t.on("click", n.proxy(function() {
                                this.overflowPopup.toggle()
                            }, r))
                        },
                        options: {
                            name: u
                        },
                        command: n.noop,
                        update: n.noop,
                        destroy: n.noop
                    });
                a.registerTool(u, new p({
                    key: "",
                    ctrl: !0,
                    template: new v({
                        template: a.overflowAnchorTemplate
                    })
                }));
                h = s.extend({
                    init: function(n, i) {
                        var r = this;
                        i = f({}, i, {
                            name: "EditorToolbar"
                        });
                        s.fn.init.call(r, n, i);
                        i.popup && r._initPopup();
                        i.resizable && i.resizable.toolbar && (r._resizeHandler = t.onResize(function() {
                            r.resize()
                        }), r.element.addClass("k-toolbar-resizable"))
                    },
                    events: ["execute"],
                    groups: {
                        basic: ["bold", "italic", "underline", "strikethrough"],
                        scripts: ["subscript", "superscript"],
                        alignment: ["justifyLeft", "justifyCenter", "justifyRight", "justifyFull"],
                        links: ["insertImage", "insertFile", "createLink", "unlink"],
                        lists: ["insertUnorderedList", "insertOrderedList", "indent", "outdent"],
                        tables: ["createTable", "addColumnLeft", "addColumnRight", "addRowAbove", "addRowBelow", "deleteRow", "deleteColumn"],
                        advanced: ["viewHtml", "cleanFormatting", "print", "pdf"],
                        fonts: ["fontName", "fontSize"],
                        colors: ["foreColor", "backColor"]
                    },
                    overflowFlaseTools: ["formatting", "fontName", "fontSize", "foreColor", "backColor", "insertHtml"],
                    _initPopup: function() {
                        this.window = n(this.element).wrap("<div class='editorToolbarWindow k-header' />").parent().prepend("<button class='k-button k-button-bare k-editortoolbar-dragHandle'><span class='k-icon k-i-move' /><\/button>").kendoWindow({
                            title: !1,
                            resizable: !1,
                            draggable: {
                                dragHandle: ".k-editortoolbar-dragHandle"
                            },
                            animation: {
                                open: {
                                    effects: "fade:in"
                                },
                                close: {
                                    effects: "fade:out"
                                }
                            },
                            minHeight: 42,
                            visible: !1,
                            autoFocus: !1,
                            actions: [],
                            dragend: function() {
                                this._moved = !0
                            }
                        }).on("mousedown", function(t) {
                            n(t.target).is(".k-icon") || t.preventDefault()
                        }).data("kendoWindow")
                    },
                    _toggleOverflowStyles: function(n, t) {
                        n.find("li").toggleClass("k-item k-state-default", t).find(".k-tool:not(.k-state-disabled),.k-overflow-button").toggleClass("k-overflow-button k-button", t)
                    },
                    _initOverflowPopup: function(t) {
                        var i = this;
                        i.overflowPopup = n("<ul class='k-editor-overflow-popup k-overflow-container k-list-container'><\/ul>").appendTo("body").kendoPopup({
                            anchor: t,
                            origin: "bottom right",
                            position: "top right",
                            copyAnchorStyles: !1,
                            open: function(n) {
                                this.element.is(":empty") && n.preventDefault();
                                i._toggleOverflowStyles(this.element, !0)
                            },
                            activate: e(i.focusOverflowPopup, i)
                        }).data("kendoPopup")
                    },
                    items: function() {
                        var t, n, i = this.options.resizable && this.options.resizable.toolbar;
                        return n = this.element.children().find("> *, select"), i && (t = this.overflowPopup, n = n.add(t.element.children().find("> *"))), n
                    },
                    focused: function() {
                        return this.element.find(".k-state-focused").length > 0
                    },
                    toolById: function(n) {
                        var t, i = this.tools;
                        for (t in i)
                            if (t.toLowerCase() == n) return i[t]
                    },
                    toolGroupFor: function(t) {
                        var i, r = this.groups;
                        if (this.isCustomTool(t)) return "custom";
                        for (i in r)
                            if (n.inArray(t, r[i]) >= 0) return i
                    },
                    bindTo: function(t) {
                        var r = this,
                            f = r.window;
                        r._editor && r._editor.unbind("select", e(r.resize, r));
                        r._editor = t;
                        r.options.resizable && r.options.resizable.toolbar && t.options.tools.push(u);
                        r.tools = r.expandTools(t.options.tools);
                        r.render();
                        r.element.find(".k-combobox .k-input").keydown(function(t) {
                            var r = n(this).closest(".k-combobox").data("kendoComboBox"),
                                u = t.keyCode;
                            u == i.RIGHT || u == i.LEFT ? r.close() : u == i.DOWN && (r.dropDown.isOpened() || (t.stopImmediatePropagation(), r.open()))
                        });
                        r._attachEvents();
                        r.items().each(function() {
                            var e, i = r._toolName(this),
                                u = "more" !== i ? r.tools[i] : r.tools.overflowAnchor,
                                o = u && u.options,
                                s = t.options.messages,
                                h = o && o.tooltip || s[i],
                                f = n(this);
                            u && u.initialize && (("fontSize" == i || "fontName" == i) && (e = s[i + "Inherit"], f.find("input").val(e).end().find("span.k-input").text(e).end()), u.initialize(f, {
                                title: r._appendShortcutSequence(h, u),
                                editor: r._editor
                            }), f.closest(".k-widget", r.element).addClass("k-editor-widget"), f.closest(".k-colorpicker", r.element).next(".k-colorpicker").addClass("k-editor-widget"))
                        });
                        t.bind("select", e(r.resize, r));
                        r.update();
                        f && f.wrapper.css({
                            top: "",
                            left: "",
                            width: ""
                        })
                    },
                    show: function() {
                        var n, r, u, t = this,
                            i = t.window,
                            f = t.options.editor;
                        i && (n = i.wrapper, r = f.element, n.is(":visible") && t.window.options.visible || (n[0].style.width || n.width(r.outerWidth() - parseInt(n.css("border-left-width"), 10) - parseInt(n.css("border-right-width"), 10)), i._moved || (u = r.offset(), n.css({
                            top: Math.max(0, parseInt(u.top, 10) - n.outerHeight() - parseInt(t.window.element.css("padding-bottom"), 10)),
                            left: Math.max(0, parseInt(u.left, 10))
                        })), i.open()))
                    },
                    hide: function() {
                        this.window && this.window.close()
                    },
                    focus: function() {
                        var n = "tabIndex",
                            i = this.element,
                            t = this._editor.element.attr(n);
                        i.attr(n, t || 0).focus().find(o).first().focus();
                        t || 0 === t || i.removeAttr(n)
                    },
                    focusOverflowPopup: function() {
                        var n = "tabIndex",
                            t = this.overflowPopup.element,
                            i = this._editor.element.attr(n);
                        t.closest(".k-animation-container").addClass("k-overflow-wrapper");
                        t.attr(n, i || 0).find(o).first().focus();
                        i || 0 === i || t.removeAttr(n)
                    },
                    _appendShortcutSequence: function(n, t) {
                        if (!t.key) return n;
                        var i = n + " (";
                        return t.ctrl && (i += "Ctrl + "), t.shift && (i += "Shift + "), t.alt && (i += "Alt + "), i + (t.key + ")")
                    },
                    _nativeTools: ["insertLineBreak", "insertParagraph", "redo", "undo"],
                    tools: {},
                    isCustomTool: function(n) {
                        return !(n in t.ui.Editor.defaultTools)
                    },
                    expandTools: function(i) {
                        for (var e, r, o, c = this._nativeTools, h = t.deepExtend({}, t.ui.Editor.defaultTools), s = {}, u = 0; i.length > u; u++) e = i[u], o = e.name, n.isPlainObject(e) ? o && h[o] ? (s[o] = f({}, h[o]), f(s[o].options, e)) : (r = f({
                            cssClass: "k-i-custom",
                            type: "button",
                            title: ""
                        }, e), r.name || (r.name = "custom"), r.cssClass = "k-" + ("custom" == r.name ? "i-custom" : r.name), r.template || "button" != r.type || (r.template = l.EditorUtils.buttonTemplate, r.title = r.title || r.tooltip), s[o] = {
                            options: r
                        }) : h[e] && (s[e] = h[e]);
                        for (u = 0; c.length > u; u++) s[c[u]] || (s[c[u]] = h[c[u]]);
                        return s
                    },
                    render: function() {
                        function tt(i) {
                            var r;
                            return i.getHtml ? r = i.getHtml() : (n.isFunction(i) || (i = t.template(i)), r = i(f)), n.trim(r)
                        }

                        function a() {
                            o.children().length && (nt && (o.data("position", g), g++), o.appendTo(k))
                        }

                        function v(t) {
                            t !== u ? (o = n("<li class='k-tool-group' role='presentation' />"), o.data("overflow", -1 === n.inArray(t, l) ? !0 : !1)) : o = n("<li class='k-overflow-tools' />")
                        }
                        var f, h, p, r, w, y, o, c, i = this,
                            b = i.tools,
                            it = i._editor.element,
                            k = i.element.empty(),
                            s = i._editor.options.tools,
                            d = t.support.browser,
                            g = 0,
                            nt = i.options.resizable && i.options.resizable.toolbar,
                            l = this.overflowFlaseTools;
                        for (k.empty(), s.length && (r = s[0].name || s[0]), v(r, l), c = 0; s.length > c; c++) r = s[c].name || s[c], f = b[r] && b[r].options, !f && n.isPlainObject(r) && (f = r), h = f && f.template, "break" == r && (a(), n("<li class='k-row-break' />").appendTo(i.element), v(r, l)), h && (y = i.toolGroupFor(r), (w != y || r == u) && (a(), v(r, l), w = y), h = tt(h), p = n(h).appendTo(o), "custom" == y && (a(), v(r, l)), f.exec && p.hasClass("k-tool") && p.click(e(f.exec, it[0])));
                        a();
                        n(i.element).children(":has(> .k-tool)").addClass("k-button-group");
                        i.options.popup && d.msie && 9 > d.version && i.window.wrapper.find("*").attr("unselectable", "on");
                        i.updateGroups();
                        nt && i._initOverflowPopup(i.element.find(".k-overflow-anchor"));
                        i.angular("compile", function() {
                            return {
                                elements: i.element
                            }
                        })
                    },
                    updateGroups: function() {
                        n(this.element).children().each(function() {
                            n(this).children().filter(function() {
                                return !n(this).hasClass("k-state-disabled")
                            }).removeClass("k-group-end").first().addClass("k-group-start").end().last().addClass("k-group-end").end()
                        })
                    },
                    decorateFrom: function(t) {
                        this.items().filter(".k-decorated").each(function() {
                            var i = n(this).data("kendoSelectBox");
                            i && i.decorate(t)
                        })
                    },
                    destroy: function() {
                        s.fn.destroy.call(this);
                        var n, i = this.tools;
                        for (n in i) i[n].destroy && i[n].destroy();
                        this.window && this.window.destroy();
                        this._resizeHandler && t.unbindResize(this._resizeHandler);
                        this.overflowPopup && this.overflowPopup.destroy()
                    },
                    _attachEvents: function() {
                        var t = this,
                            u = "[role=button].k-tool",
                            f = u + ":not(.k-state-disabled)",
                            e = u + ".k-state-disabled",
                            s = t.overflowPopup ? t.overflowPopup.element : n([]);
                        t.element.add(s).off(r).on("mouseenter" + r, f, function() {
                            n(this).addClass("k-state-hover")
                        }).on("mouseleave" + r, f, function() {
                            n(this).removeClass("k-state-hover")
                        }).on("mousedown" + r, u, function(n) {
                            n.preventDefault()
                        }).on("keydown" + r, o, function(r) {
                            function e(n, t, i) {
                                var r = t.find(o),
                                    u = r.index(h) + n;
                                return i && (u = Math.max(0, Math.min(r.length - 1, u))), r[u]
                            }
                            var u, s, h = this,
                                c = t.options.resizable && t.options.resizable.toolbar,
                                f = r.keyCode;
                            f == i.RIGHT || f == i.LEFT ? n(h).hasClass(".k-dropdown") || (u = e(f == i.RIGHT ? 1 : -1, t.element, !0)) : !c || f != i.UP && f != i.DOWN ? f == i.ESC ? (t.overflowPopup.visible() && t.overflowPopup.close(), u = t._editor) : f != i.TAB || r.ctrlKey || r.altKey || (s = c && n(h.parentElement).hasClass("k-overflow-tool-group") ? t.overflowPopup.element : t.element, r.shiftKey ? u = e(-1, s) : (u = e(1, s), u || (u = t._editor))) : u = e(f == i.DOWN ? 1 : -1, t.overflowPopup.element, !0);
                            u && (r.preventDefault(), u.focus())
                        }).on("click" + r, f, function(i) {
                            var r = n(this);
                            i.preventDefault();
                            i.stopPropagation();
                            r.removeClass("k-state-hover");
                            r.is("[data-popup]") || t._editor.exec(t._toolName(this))
                        }).on("click" + r, e, function(n) {
                            n.preventDefault()
                        })
                    },
                    _toolName: function(t) {
                        var i, r;
                        if (t) return i = t.className, /k-tool\b/i.test(i) && (i = t.firstChild.className), r = n.grep(i.split(" "), function(n) {
                            return !/^k-(widget|tool|tool-icon|icon|state-hover|header|combobox|dropdown|selectbox|colorpicker)$/i.test(n)
                        }), r[0] ? r[0].substring(r[0].lastIndexOf("-") + 1) : "custom"
                    },
                    refreshTools: function() {
                        var i = this,
                            f = i._editor,
                            u = f.getRange(),
                            r = t.ui.editor.RangeUtils.textNodes(u);
                        r.length || (r = [u.startContainer]);
                        i.items().each(function() {
                            var t = i.tools[i._toolName(this)];
                            t && t.update && t.update(n(this), r)
                        });
                        this.update()
                    },
                    update: function() {
                        this.updateGroups()
                    },
                    _resize: function(n) {
                        var i = n.width,
                            r = this.options.resizable && this.options.resizable.toolbar,
                            t = this.overflowPopup;
                        this.refreshTools();
                        r && (t.visible() && t.close(!0), this._refreshWidths(), this._shrink(i), this._stretch(i), this._toggleOverflowStyles(this.element, !1), this._toggleOverflowStyles(this.overflowPopup.element, !0), this.element.children("li.k-overflow-tools").css("visibility", t.element.is(":empty") ? "hidden" : "visible"))
                    },
                    _refreshWidths: function() {
                        this.element.children("li").each(function(t, i) {
                            var r = n(i);
                            r.data("outerWidth", r.outerWidth(!0))
                        })
                    },
                    _shrink: function(n) {
                        var r, i, t;
                        if (n < this._groupsWidth())
                            for (i = this._visibleGroups().filter(":not(.k-overflow-tools)"), t = i.length - 1; t >= 0 && (r = i.eq(t), !(n > this._groupsWidth())); t--) this._hideGroup(r)
                    },
                    _stretch: function(n) {
                        var r, i, t;
                        if (n > this._groupsWidth())
                            for (i = this._hiddenGroups(), t = 0; i.length > t && (r = i.eq(t), !(n < this._groupsWidth()) && this._showGroup(r, n)); t++);
                    },
                    _hiddenGroups: function() {
                        var i = this.overflowPopup,
                            t = this.element.children("li.k-tool-group").filter(":hidden");
                        return t = t.add(i.element.children("li")), t.sort(function(t, i) {
                            return n(t).data("position") > n(i).data("position") ? 1 : -1
                        }), t
                    },
                    _visibleGroups: function() {
                        return this.element.children("li.k-tool-group, li.k-overflow-tools").filter(":visible")
                    },
                    _groupsWidth: function() {
                        var t = 0;
                        return this._visibleGroups().each(function() {
                            t += n(this).data("outerWidth")
                        }), Math.ceil(t)
                    },
                    _hideGroup: function(n) {
                        if (n.data("overflow")) {
                            var t = this.overflowPopup;
                            n.detach().prependTo(t.element).addClass("k-overflow-tool-group")
                        } else n.hide()
                    },
                    _showGroup: function(t, i) {
                        var r, u;
                        return t.length && i > this._groupsWidth() + t.data("outerWidth") ? (t.hasClass("k-overflow-tool-group") ? (r = t.data("position"), 0 === r ? t.detach().prependTo(this.element) : (u = this.element.children().filter(function(t, i) {
                            return n(i).data("position") === r - 1
                        }), t.detach().insertAfter(u)), t.removeClass("k-overflow-tool-group")) : t.show(), !0) : !1
                    }
                });
                n.extend(l, {
                    Toolbar: h
                })
            }(window.jQuery)
        }(),
        function() {
            ! function(n) {
                var r = window.kendo,
                    y = n.extend,
                    h = n.proxy,
                    i = r.ui.editor,
                    t = i.Dom,
                    u = i.EditorUtils,
                    rt = i.RangeUtils,
                    c = i.Command,
                    l = ".kendoEditor",
                    p = "k-state-active",
                    v = "k-state-selected",
                    a = i.Tool,
                    f = i.ToolTemplate,
                    w = i.InsertHtmlCommand,
                    ut = i.BlockFormatFinder,
                    e = i.EditorUtils.registerTool,
                    ft = "<td>" + i.emptyElementContent + "<\/td>",
                    b = new ut([{
                        tags: ["table"]
                    }]),
                    k = w.extend({
                        _tableHtml: function(n, t) {
                            return n = n || 1, t = t || 1, "<table class='k-table' data-last>" + Array(n + 1).join("<tr>" + Array(t + 1).join(ft) + "<\/tr>") + "<\/table>"
                        },
                        postProcess: function(t, i) {
                            var r = n("table[data-last]", t.document).removeAttr("data-last");
                            i.setStart(r.find("td")[0], 0);
                            i.collapse(!0);
                            t.selectRange(i)
                        },
                        exec: function() {
                            var n = this.options;
                            n.html = this._tableHtml(n.rows, n.columns);
                            n.postProcess = this.postProcess;
                            w.fn.exec.call(this)
                        }
                    }),
                    o = a.extend({
                        initialize: function(t, i) {
                            a.fn.initialize.call(this, t, i);
                            var r = n(this.options.popupTemplate).appendTo("body").kendoPopup({
                                anchor: t,
                                copyAnchorStyles: !1,
                                open: h(this._open, this),
                                activate: h(this._activate, this),
                                close: h(this._close, this)
                            }).data("kendoPopup");
                            t.click(h(this._toggle, this)).keydown(h(this._keydown, this));
                            this._editor = i.editor;
                            this._popup = r
                        },
                        popup: function() {
                            return this._popup
                        },
                        _activate: n.noop,
                        _open: function() {
                            this._popup.options.anchor.addClass(p)
                        },
                        _close: function() {
                            this._popup.options.anchor.removeClass(p)
                        },
                        _keydown: function(n) {
                            var t = r.keys,
                                i = n.keyCode;
                            i == t.DOWN && n.altKey ? this._popup.open() : i == t.ESC && this._popup.close()
                        },
                        _toggle: function(t) {
                            var i = n(t.target).closest(".k-tool");
                            i.hasClass("k-state-disabled") || this.popup().toggle()
                        },
                        update: function(n) {
                            var t = this.popup();
                            t.wrapper && "block" == t.wrapper.css("display") && t.close();
                            n.removeClass("k-state-hover")
                        },
                        destroy: function() {
                            this._popup.destroy()
                        }
                    }),
                    d = o.extend({
                        init: function(t) {
                            this.cols = 8;
                            this.rows = 6;
                            o.fn.init.call(this, n.extend(t, {
                                command: k,
                                popupTemplate: "<div class='k-ct-popup'>" + Array(this.cols * this.rows + 1).join("<span class='k-ct-cell k-state-disabled' />") + "<div class='k-status'><\/div><\/div>"
                            }))
                        },
                        _activate: function() {
                            function s(t) {
                                var r = n(window);
                                return {
                                    row: Math.floor((t.clientY + r.scrollTop() - i.top) / c) + 1,
                                    col: Math.floor((t.clientX + r.scrollLeft() - i.left) / h) + 1
                                }
                            }
                            var h, c, t = this,
                                f = t._popup.element,
                                e = f.find(".k-ct-cell"),
                                a = e.eq(0),
                                o = e.eq(e.length - 1),
                                i = r.getOffset(a),
                                u = r.getOffset(o),
                                v = t.cols,
                                y = t.rows;
                            f.find("*").addBack().attr("unselectable", "on");
                            u.left += o[0].offsetWidth;
                            u.top += o[0].offsetHeight;
                            h = (u.left - i.left) / v;
                            c = (u.top - i.top) / y;
                            f.on("mousemove" + l, function(n) {
                                t._setTableSize(s(n))
                            }).on("mouseleave" + l, function() {
                                t._setTableSize()
                            }).on("mouseup" + l, function(n) {
                                t._exec(s(n))
                            })
                        },
                        _valid: function(n) {
                            return n && n.row > 0 && n.col > 0 && this.rows >= n.row && this.cols >= n.col
                        },
                        _exec: function(n) {
                            this._valid(n) && (this._editor.exec("createTable", {
                                rows: n.row,
                                columns: n.col
                            }), this._popup.close())
                        },
                        _setTableSize: function(t) {
                            var i = this._popup.element,
                                u = i.find(".k-status"),
                                f = i.find(".k-ct-cell"),
                                e = this.cols,
                                o = this._editor.options.messages;
                            this._valid(t) ? (u.text(r.format(o.createTableHint, t.row, t.col)), f.each(function(i) {
                                n(this).toggleClass(v, t.col > i % e && t.row > i / e)
                            })) : (u.text(o.dialogCancel), f.removeClass(v))
                        },
                        _keydown: function(n) {
                            var t, i, c, s, f, e, u, h;
                            o.fn._keydown.call(this, n);
                            this._popup.visible() && (t = r.keys, i = n.keyCode, c = this._popup.element.find(".k-ct-cell"), s = Math.max(c.filter(".k-state-selected").last().index(), 0), f = Math.floor(s / this.cols), e = s % this.cols, u = !1, i != t.DOWN || n.altKey ? i == t.UP ? (u = !0, f--) : i == t.RIGHT ? (u = !0, e++) : i == t.LEFT && (u = !0, e--) : (u = !0, f++), h = {
                                row: Math.max(1, Math.min(this.rows, f + 1)),
                                col: Math.max(1, Math.min(this.cols, e + 1))
                            }, i == t.ENTER ? this._exec(h) : this._setTableSize(h), u && (n.preventDefault(), n.stopImmediatePropagation()))
                        },
                        _open: function() {
                            var n = this._editor.options.messages;
                            o.fn._open.call(this);
                            this.popup().element.find(".k-status").text(n.dialogCancel).end().find(".k-ct-cell").removeClass(v)
                        },
                        _close: function() {
                            o.fn._close.call(this);
                            this.popup().element.off(l)
                        },
                        update: function(n, t) {
                            var i;
                            o.fn.update.call(this, n);
                            i = b.isFormatted(t);
                            n.toggleClass("k-state-disabled", i)
                        }
                    }),
                    g = c.extend({
                        exec: function() {
                            for (var o, n, r, u, e = this.lockRange(!0), f = e.endContainer;
                                "td" != t.name(f);) f = f.parentNode;
                            for (n = f.parentNode, o = n.children.length, r = n.cloneNode(!0), u = 0; n.cells.length > u; u++) r.cells[u].innerHTML = i.emptyElementContent;
                            "before" == this.options.position ? t.insertBefore(r, n) : t.insertAfter(r, n);
                            this.releaseRange(e)
                        }
                    }),
                    nt = c.extend({
                        exec: function() {
                            for (var r, u, e = this.lockRange(!0), o = t.closest(e.endContainer, "td"), h = t.closest(o, "table"), s = h.rows, c = this.options.position, f = t.findNodeIndex(o, !0), n = 0; s.length > n; n++) r = s[n].cells[f], u = r.cloneNode(), u.innerHTML = i.emptyElementContent, "before" == c ? t.insertBefore(u, r) : t.insertAfter(u, r);
                            this.releaseRange(e)
                        }
                    }),
                    tt = c.extend({
                        exec: function() {
                            var i, u, r, f = this.lockRange(),
                                e = rt.mapAll(f, function(t) {
                                    return n(t).closest("tr")[0]
                                }),
                                o = t.closest(e[0], "table");
                            if (e.length >= o.rows.length) i = t.next(o), (!i || t.insignificant(i)) && (i = t.prev(o)), t.remove(o);
                            else
                                for (u = 0; e.length > u; u++) r = e[u], t.removeTextSiblings(r), i = t.next(r) || t.prev(r), i = i.cells[0], t.remove(r);
                            i && (f.setStart(i, 0), f.collapse(!0), this.editor.selectRange(f))
                        }
                    }),
                    it = c.extend({
                        exec: function() {
                            var n, r, u = this.lockRange(),
                                i = t.closest(u.endContainer, "td"),
                                f = t.closest(i, "table"),
                                e = f.rows,
                                o = t.findNodeIndex(i, !0),
                                s = e[0].cells.length;
                            if (1 == s) n = t.next(f), (!n || t.insignificant(n)) && (n = t.prev(f)), t.remove(f);
                            else
                                for (t.removeTextSiblings(i), n = t.next(i) || t.prev(i), r = 0; e.length > r; r++) t.remove(e[r].cells[o]);
                            n && (u.setStart(n, 0), u.collapse(!0), this.editor.selectRange(u))
                        }
                    }),
                    s = a.extend({
                        command: function(n) {
                            return n = y(n, this.options), "delete" == n.action ? "row" == n.type ? new tt(n) : new it(n) : "row" == n.type ? new g(n) : new nt(n)
                        },
                        initialize: function(n, t) {
                            a.fn.initialize.call(this, n, t);
                            n.addClass("k-state-disabled")
                        },
                        update: function(n, t) {
                            var i = !b.isFormatted(t);
                            n.toggleClass("k-state-disabled", i)
                        }
                    });
                y(r.ui.editor, {
                    PopupTool: o,
                    TableCommand: k,
                    InsertTableTool: d,
                    TableModificationTool: s,
                    InsertRowCommand: g,
                    InsertColumnCommand: nt,
                    DeleteRowCommand: tt,
                    DeleteColumnCommand: it
                });
                e("createTable", new d({
                    template: new f({
                        template: u.buttonTemplate,
                        popup: !0,
                        title: "Create table"
                    })
                }));
                e("addColumnLeft", new s({
                    type: "column",
                    position: "before",
                    template: new f({
                        template: u.buttonTemplate,
                        title: "Add column on the left"
                    })
                }));
                e("addColumnRight", new s({
                    type: "column",
                    template: new f({
                        template: u.buttonTemplate,
                        title: "Add column on the right"
                    })
                }));
                e("addRowAbove", new s({
                    type: "row",
                    position: "before",
                    template: new f({
                        template: u.buttonTemplate,
                        title: "Add row above"
                    })
                }));
                e("addRowBelow", new s({
                    type: "row",
                    template: new f({
                        template: u.buttonTemplate,
                        title: "Add row below"
                    })
                }));
                e("deleteRow", new s({
                    type: "row",
                    action: "delete",
                    template: new f({
                        template: u.buttonTemplate,
                        title: "Delete row"
                    })
                }));
                e("deleteColumn", new s({
                    type: "column",
                    action: "delete",
                    template: new f({
                        template: u.buttonTemplate,
                        title: "Delete column"
                    })
                }))
            }(window.kendo.jQuery)
        }(), window.kendo
}, "function" == typeof define && define.amd ? define : function(n, t) {
    t()
});
! function(n, t) {
    t(["./kendo.data.min", "./kendo.draganddrop.min"], n)
}(function() {
    return function(n, t) {
        var i = window.kendo,
            e = i.ui,
            u = n.proxy,
            o = n.extend,
            f = "visibility",
            r = "k-state-hover",
            s = "input,a,textarea,.k-multiselect-wrap,select,button,a.k-button>.k-icon,button.k-button>.k-icon,span.k-icon.k-i-expand,span.k-icon.k-i-collapse";
        e.HierarchicalDragAndDrop = i.Class.extend({
            init: function(t, r) {
                this.element = t;
                this.hovered = t;
                this.options = o({
                    dragstart: n.noop,
                    drag: n.noop,
                    drop: n.noop,
                    dragend: n.noop
                }, r);
                this._draggable = new e.Draggable(t, {
                    ignore: s,
                    filter: r.filter,
                    autoScroll: r.autoScroll,
                    cursorOffset: {
                        left: 10,
                        top: i.support.mobileOS ? -40 / i.support.zoomLevel() : 10
                    },
                    hint: u(this._hint, this),
                    dragstart: u(this.dragstart, this),
                    dragcancel: u(this.dragcancel, this),
                    drag: u(this.drag, this),
                    dragend: u(this.dragend, this),
                    $angular: r.$angular
                })
            },
            _hint: function(n) {
                return "<div class='k-header k-drag-clue'><span class='k-icon k-drag-status' />" + this.options.hintText(n) + "<\/div>"
            },
            _removeTouchHover: function() {
                i.support.touch && this.hovered && (this.hovered.find("." + r).removeClass(r), this.hovered = !1)
            },
            _hintStatus: function(i) {
                var r = this._draggable.hint.find(".k-drag-status")[0];
                return i ? (r.className = "k-icon k-drag-status " + i, t) : n.trim(r.className.replace(/k-(icon|drag-status)/g, ""))
            },
            dragstart: function(t) {
                this.source = t.currentTarget.closest(this.options.itemSelector);
                this.options.dragstart(this.source) && t.preventDefault();
                this.dropHint = this.options.reorderable ? n("<div class='k-drop-hint' />").css(f, "hidden").appendTo(this.element) : n()
            },
            drag: function(t) {
                var e, v, p, c, w, o, y, s, l, b, u, a = this.options,
                    k = this.source,
                    h = this.dropTarget = n(i.eventTarget(t)),
                    d = h.closest(a.allowedContainers);
                d.length ? k[0] == h[0] || a.contains(k[0], h[0]) ? u = "k-denied" : (u = "k-insert-middle", l = a.itemFromTarget(h), e = l.item, e.length ? (this._removeTouchHover(), v = e.outerHeight(), c = l.content, a.reorderable ? (w = v / (c.length > 0 ? 4 : 2), p = i.getOffset(e).top, o = p + w > t.y.location, y = t.y.location > p + v - w, s = c.length && !o && !y) : (s = !0, o = !1, y = !1), this.hovered = s ? d : !1, this.dropHint.css(f, s ? "hidden" : "visible"), this._lastHover && this._lastHover[0] != c[0] && this._lastHover.removeClass(r), this._lastHover = c.toggleClass(r, s), s ? u = "k-add" : (b = e.position(), b.top += o ? 0 : v, this.dropHint.css(b)[o ? "prependTo" : "appendTo"](a.dropHintContainer(e)), o && l.first && (u = "k-insert-top"), y && l.last && (u = "k-insert-bottom"))) : h[0] != this.dropHint[0] && (this._lastHover && this._lastHover.removeClass(r), u = n.contains(this.element[0], d[0]) ? "k-denied" : "k-add")) : (u = "k-denied", this._removeTouchHover());
                this.options.drag({
                    originalEvent: t.originalEvent,
                    source: k,
                    target: h,
                    pageY: t.y.location,
                    pageX: t.x.location,
                    status: u.substring(2),
                    setStatus: function(n) {
                        u = n
                    }
                });
                "k-denied" == u && this._lastHover && this._lastHover.removeClass(r);
                0 !== u.indexOf("k-insert") && this.dropHint.css(f, "hidden");
                this._hintStatus(u)
            },
            dragcancel: function() {
                this.dropHint.remove()
            },
            dragend: function(n) {
                var i, u, h, s = "over",
                    c = this.source,
                    e = this.dropHint,
                    o = this.dropTarget;
                return "visible" == e.css(f) ? (s = this.options.dropPositionFrom(e), i = e.closest(this.options.itemSelector)) : o && (i = o.closest(this.options.itemSelector), i.length || (i = o.closest(this.options.allowedContainers))), u = {
                    originalEvent: n.originalEvent,
                    source: c[0],
                    destination: i[0],
                    valid: "k-denied" != this._hintStatus(),
                    setValid: function(n) {
                        this.valid = n
                    },
                    dropTarget: o[0],
                    position: s
                }, h = this.options.drop(u), e.remove(), this._removeTouchHover(), this._lastHover && this._lastHover.removeClass(r), !u.valid || h ? (this._draggable.dropped = u.valid, t) : (this._draggable.dropped = !0, this.options.dragend({
                    originalEvent: n.originalEvent,
                    source: c,
                    destination: i,
                    position: s
                }), t)
            },
            destroy: function() {
                this._lastHover = this.hovered = null;
                this._draggable.destroy()
            }
        })
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(n, t) {
    t()
})